Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • forge forge
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 1
    • Merge requests 1
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • ISC Open Source ProjectsISC Open Source Projects
  • forgeforge
  • Merge requests
  • !345

use here-documents and remove the need for the singlequotes parameter

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Andrei Pavel requested to merge searching-in-files into master Nov 28, 2022
  • Overview 10
  • Commits 4
  • Pipelines 14
  • Changes 12

We have some tests in forge that fail because of improper quoting of lines searched in files.

ValueError: invalid literal for int() with base 10: 'grep: lease: No such file or directory\ngrep: added. } \\]: No such file or directory\n0'

In this case, the lne itself contains double quotes and is enclosed in double quotes, so the result is, it splits the line into multiple parameters.

Instead of fixing each of them by quoting properly, I suggest we remove the need to quote by using here-documents (cat <<EOF, EOF).

This fixes some tests. And there are other changes that fix other tests.

Job: https://jenkins.aws.isc.org/view/Kea-manual/job/kea-manual/job/tarball-system-tests/223/

Edited Dec 06, 2022 by Andrei Pavel
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: searching-in-files