Uploaded image for project: 'Service Binding'
  1. Service Binding
  2. APPSVC-109 [ Helm 3 ] Testing on OpenShift 4
  3. APPSVC-291

Resolve failures in upstream unit tests when running in OpenShift CI

XMLWordPrintable

    • Icon: Sub-task Sub-task
    • Resolution: Done
    • Icon: Undefined Undefined
    • None
    • None
    • Helm
    • None
    • App Services Sprint 174, App Services Sprint 175, App Services Sprint 176, App Services Sprint 179

      Description

       
      After installing the code change from pull request 13 (https://github.com/redhat-developer/helm/pull/17) - seeing these unit test results:

       

       make test-unit
      ==> Running unit tests <==
       GO111MODULE=on go test -run . ./... 
       ok helm.sh/helm/v3/cmd/helm (cached)
       ok helm.sh/helm/v3/cmd/helm/require (cached)
       ok helm.sh/helm/v3/cmd/helm/search (cached)
       ok helm.sh/helm/v3/internal/experimental/registry (cached)
       ok helm.sh/helm/v3/internal/ignore (cached)
       ok helm.sh/helm/v3/internal/monocular (cached)
       ok helm.sh/helm/v3/internal/resolver (cached)
       ok helm.sh/helm/v3/internal/sympath (cached)
       ? helm.sh/helm/v3/internal/test [no test files]
       ? helm.sh/helm/v3/internal/test/ensure [no test files]
       ok helm.sh/helm/v3/internal/third_party/dep/fs (cached)
       ? helm.sh/helm/v3/internal/third_party/k8s.io/kubernetes/deployment/util [no test files]
       ok helm.sh/helm/v3/internal/tlsutil (cached)
       ok helm.sh/helm/v3/internal/urlutil (cached)
       ? helm.sh/helm/v3/internal/version [no test files]
       ok helm.sh/helm/v3/pkg/action (cached)
       ok helm.sh/helm/v3/pkg/chart (cached)
       ok helm.sh/helm/v3/pkg/chart/loader (cached)
       ok helm.sh/helm/v3/pkg/chartutil (cached)
       ? helm.sh/helm/v3/pkg/chartutil/generator [no test files]
       ok helm.sh/helm/v3/pkg/cli 0.037s
       ? helm.sh/helm/v3/pkg/cli/output [no test files]
       ok helm.sh/helm/v3/pkg/cli/values (cached)
       ok helm.sh/helm/v3/pkg/downloader (cached)
       ok helm.sh/helm/v3/pkg/engine (cached)
       ok helm.sh/helm/v3/pkg/gates (cached)
       ok helm.sh/helm/v3/pkg/getter 0.043s
       ok helm.sh/helm/v3/pkg/helmpath (cached)
       ? helm.sh/helm/v3/pkg/helmpath/xdg [no test files]
       ok helm.sh/helm/v3/pkg/kube (cached)
       ? helm.sh/helm/v3/pkg/kube/fake [no test files]
       ok helm.sh/helm/v3/pkg/lint (cached)
       ok helm.sh/helm/v3/pkg/lint/rules (cached)
       ok helm.sh/helm/v3/pkg/lint/support (cached)
       ? helm.sh/helm/v3/pkg/manifest [no test files]
       ok helm.sh/helm/v3/pkg/plugin 0.026s
       ? helm.sh/helm/v3/pkg/plugin/cache [no test files]
       ok helm.sh/helm/v3/pkg/plugin/installer (cached)
       ok helm.sh/helm/v3/pkg/provenance (cached)
       ? helm.sh/helm/v3/pkg/release [no test files]
       ok helm.sh/helm/v3/pkg/releaseutil (cached)
       ok helm.sh/helm/v3/pkg/renderutil (cached)
       ok helm.sh/helm/v3/pkg/repo (cached)
       ok helm.sh/helm/v3/pkg/repo/repotest (cached)
       ok helm.sh/helm/v3/pkg/storage (cached)
       ok helm.sh/helm/v3/pkg/storage/driver (cached)
       ? helm.sh/helm/v3/pkg/storage/errors [no test files]
       ok helm.sh/helm/v3/pkg/strvals (cached)
       ok helm.sh/helm/v3/pkg/time (cached)
       
      

       

      However - when running in CI - these test failures are being seen:

       

      ok helm.sh/helm/v3/cmd/helm 4.487s
       ok helm.sh/helm/v3/cmd/helm/require 0.078s
       ok helm.sh/helm/v3/cmd/helm/search 0.058s
       ok helm.sh/helm/v3/internal/experimental/registry 4.521s
       ok helm.sh/helm/v3/internal/ignore 0.045s
       ok helm.sh/helm/v3/internal/monocular 0.011s
       ok helm.sh/helm/v3/internal/resolver 0.052s
       ok helm.sh/helm/v3/internal/sympath 0.068s
       ? helm.sh/helm/v3/internal/test [no test files]
       ? helm.sh/helm/v3/internal/test/ensure [no test files]
       — FAIL: TestCopyDirFail_SrcInaccessible (0.00s)
       fs_test.go:181: Failed to get name of current user: user: unknown userid 1014710000
       — FAIL: TestCopyDirFail_DstInaccessible (0.00s)
       fs_test.go:220: Failed to get name of current user: user: unknown userid 1014710000
       — FAIL: TestCopyDirFailOpen (0.00s)
       fs_test.go:320: Failed to get name of current user: user: unknown userid 1014710000
       — FAIL: TestCopyFileFail (0.00s)
       fs_test.go:489: Failed to get name of current user: user: unknown userid 1014710000
       — FAIL: TestIsDir (0.00s)
       fs_test.go:580: Failed to get name of current user: user: unknown userid 1014710000
       — FAIL: TestIsSymlink (0.00s)
       fs_test.go:637: Failed to get name of current user: user: unknown userid 1014710000
       FAIL
       FAIL helm.sh/helm/v3/internal/third_party/dep/fs 0.078s
       ? helm.sh/helm/v3/internal/third_party/k8s.io/kubernetes/deployment/util [no test files]
       ok helm.sh/helm/v3/internal/tlsutil 0.027s
       ok helm.sh/helm/v3/internal/urlutil 0.021s
       ? helm.sh/helm/v3/internal/version [no test files]
       ok helm.sh/helm/v3/pkg/action 0.166s
       ok helm.sh/helm/v3/pkg/chart 0.007s
       ok helm.sh/helm/v3/pkg/chart/loader 0.078s
       2019/11/21 12:48:12 warning: destination for details is a table. Ignoring non-table value empty
       2019/11/21 12:48:12 warning: cannot overwrite table with non table for boat (map[mast:true])
       2019/11/21 12:48:12 found symbolic link in path: /go/src/github.com/redhat-developer/helm/pkg/chartutil/testdata/joonix/charts/frobnitz resolves to /go/src/github.com/redhat-developer/helm/pkg/chartutil/testdata/frobnitz
       — FAIL: TestExpand (0.00s)
       expand_test.go:85: Expected templates to have size 6, got 26
       expand_test.go:85: Expected docs to have size 6, got 23
       expand_test.go:85: Expected charts to have size 20, got 63
       — FAIL: TestExpandFile (0.01s)
       expand_test.go:131: Expected templates to have size 6, got 26
       expand_test.go:131: Expected docs to have size 6, got 23
       expand_test.go:131: Expected charts to have size 20, got 63
       FAIL
       FAIL helm.sh/helm/v3/pkg/chartutil 0.228s
       ? helm.sh/helm/v3/pkg/chartutil/generator [no test files]
       — FAIL: TestEnvSettings (0.00s)
       — FAIL: TestEnvSettings/defaults (0.00s)
       environment_test.go:82: expected namespace "default", got "ci-op-ylsjjq9c"
       FAIL
       FAIL helm.sh/helm/v3/pkg/cli 0.095s
       ? helm.sh/helm/v3/pkg/cli/output [no test files]
       ok helm.sh/helm/v3/pkg/cli/values 0.047s
       ok helm.sh/helm/v3/pkg/downloader 0.366s
       ok helm.sh/helm/v3/pkg/engine 0.092s
       ok helm.sh/helm/v3/pkg/gates 0.013s
       ok helm.sh/helm/v3/pkg/getter 0.094s
       ok helm.sh/helm/v3/pkg/helmpath 0.020s
       ? helm.sh/helm/v3/pkg/helmpath/xdg [no test files]
       ok helm.sh/helm/v3/pkg/kube 0.074s
       ? helm.sh/helm/v3/pkg/kube/fake [no test files]
       ok helm.sh/helm/v3/pkg/lint 0.045s
       ok helm.sh/helm/v3/pkg/lint/rules 0.066s
       ok helm.sh/helm/v3/pkg/lint/support 0.055s
       ? helm.sh/helm/v3/pkg/manifest [no test files]
       ok helm.sh/helm/v3/pkg/plugin 0.049s
       ? helm.sh/helm/v3/pkg/plugin/cache [no test files]
       ok helm.sh/helm/v3/pkg/plugin/installer 1.581s
       ok helm.sh/helm/v3/pkg/provenance 0.415s
       ? helm.sh/helm/v3/pkg/release [no test files]
       ok helm.sh/helm/v3/pkg/releaseutil 0.052s
       ok helm.sh/helm/v3/pkg/renderutil 0.051s
       — FAIL: TestFindChartInRepoURL (0.00s)
       chartrepo_test.go:288: looks like "http://127.0.0.1:44582" is not a valid chart repository or cannot be reached: open /.cache/helm/repository/LZ+Nv+JsvyqfjLIEFIl292PpSNc=-index.yaml: no such file or directory
       — FAIL: TestErrorFindChartInRepoURL (0.03s)
       chartrepo_test.go:324: Expected error for chart not found, but got a different error (looks like "http://127.0.0.1:33565" is not a valid chart repository or cannot be reached: open /.cache/helm/repository/g1WU9UXym5iEnzEGjh+zRF5Msz8=-index.yaml: no such file or directory)
       chartrepo_test.go:330: Expected error for chart not found, but got a different error (looks like "http://127.0.0.1:33565" is not a valid chart repository or cannot be reached: open /.cache/helm/repository/Bgdc5g-xwqwTVLQ11uUqBnZi1MM=-index.yaml: no such file or directory)
       chartrepo_test.go:336: Expected error for chart not found, but got a different error (looks like "http://127.0.0.1:33565" is not a valid chart repository or cannot be reached: open /.cache/helm/repository/GxVE1glnvZ7dztHnkD2KoQY4tB4=-index.yaml: no such file or directory)
       — FAIL: TestDownloadIndexFile (0.00s)
       — FAIL: TestDownloadIndexFile/should__download_index_file (0.00s)
       index_test.go:164: Failed to download index file to /.cache/helm/repository/test-repo-index.yaml: &os.PathError
      {Op:"open", Path:"/.cache/helm/repository/test-repo-index.yaml", Err:0x2}
      — FAIL: TestDownloadIndexFile/should_not_decode_the_path_in_the_repo_url_while_downloading_index (0.00s)
       index_test.go:210: Failed to download index file to /.cache/helm/repository/test-repo-index.yaml: &os.PathError
      {Op:"open", Path:"/.cache/helm/repository/test-repo-index.yaml", Err:0x2}
      WARNING: Deprecated index file format. Try 'helm repo update'
       FAIL
       FAIL helm.sh/helm/v3/pkg/repo 0.118s
       ok helm.sh/helm/v3/pkg/repo/repotest 0.060s
       ok helm.sh/helm/v3/pkg/storage 0.031s
       ok helm.sh/helm/v3/pkg/storage/driver 0.048s
       ? helm.sh/helm/v3/pkg/storage/errors [no test files]
       ok helm.sh/helm/v3/pkg/strvals 0.012s
       ok helm.sh/helm/v3/pkg/time 0.007s
      
      

      Acceptance Criteria

      Unit tests should run as cleanly in CI as they do in a local shell. 

       

            ldimaggi@redhat.com Len DiMaggio
            ldimaggi@redhat.com Len DiMaggio
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: