2016-06-22 14:28:45 -04:00
/ *
2018-08-24 15:03:55 -04:00
Copyright The Helm Authors .
2016-06-22 14:28:45 -04:00
Licensed under the Apache License , Version 2.0 ( the "License" ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
http : //www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing , software
distributed under the License is distributed on an "AS IS" BASIS ,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND , either express or implied .
See the License for the specific language governing permissions and
limitations under the License .
* /
2025-02-24 10:11:54 -05:00
package cmd
2016-05-04 16:46:56 -04:00
import (
2016-12-12 15:02:51 -05:00
"fmt"
2021-06-11 14:36:55 -04:00
"net/http"
"net/http/httptest"
2016-09-17 00:19:23 -04:00
"os"
"path/filepath"
2016-05-04 16:46:56 -04:00
"testing"
2016-09-17 00:19:23 -04:00
2025-08-31 09:04:48 -04:00
"helm.sh/helm/v4/pkg/repo/v1/repotest"
2016-05-04 16:46:56 -04:00
)
2018-09-28 14:37:57 -04:00
func TestPullCmd ( t * testing . T ) {
2024-12-01 02:46:18 -05:00
srv := repotest . NewTempServer (
t ,
repotest . WithChartSourceGlob ( "testdata/testcharts/*.tgz*" ) ,
)
2018-05-14 12:23:21 -04:00
defer srv . Stop ( )
2020-10-01 17:37:44 -04:00
ociSrv , err := repotest . NewOCIServer ( t , srv . Root ( ) )
if err != nil {
t . Fatal ( err )
}
ociSrv . Run ( t )
2019-01-14 03:11:21 -05:00
if err := srv . LinkIndices ( ) ; err != nil {
t . Fatal ( err )
}
2020-02-28 12:32:45 -05:00
helmTestKeyOut := "Signed by: Helm Testing (This key should only be used for testing. DO NOT TRUST.) <helm-testing@helm.sh>\n" +
"Using Key With Fingerprint: 5E615389B53CA37F0EE60BD3843BBF981FC18762\n" +
"Chart Hash Verified: "
2019-01-14 03:11:21 -05:00
// all flags will get "-d outdir" appended.
2016-09-17 00:19:23 -04:00
tests := [ ] struct {
2016-12-12 15:02:51 -05:00
name string
2019-08-26 13:21:52 -04:00
args string
2020-01-10 10:01:59 -05:00
existFile string
existDir string
2018-05-09 11:37:20 -04:00
wantError bool
2020-01-10 10:01:59 -05:00
wantErrorMsg string
2016-12-12 15:02:51 -05:00
failExpect string
expectFile string
expectDir bool
expectVerify bool
2020-02-28 12:32:45 -05:00
expectSha string
2016-09-17 00:19:23 -04:00
} {
{
name : "Basic chart fetch" ,
2019-08-26 13:21:52 -04:00
args : "test/signtest" ,
2016-09-17 00:19:23 -04:00
expectFile : "./signtest-0.1.0.tgz" ,
} ,
2016-10-05 14:43:06 -04:00
{
name : "Chart fetch with version" ,
2019-08-26 13:21:52 -04:00
args : "test/signtest --version=0.1.0" ,
2016-10-05 14:43:06 -04:00
expectFile : "./signtest-0.1.0.tgz" ,
} ,
{
name : "Fail chart fetch with non-existent version" ,
2019-08-26 13:21:52 -04:00
args : "test/signtest --version=99.1.0" ,
2018-05-09 11:37:20 -04:00
wantError : true ,
2016-10-05 14:43:06 -04:00
failExpect : "no such chart" ,
} ,
2016-09-17 00:19:23 -04:00
{
name : "Fail fetching non-existent chart" ,
2019-08-26 13:21:52 -04:00
args : "test/nosuchthing" ,
2016-09-17 00:19:23 -04:00
failExpect : "Failed to fetch" ,
2018-05-09 11:37:20 -04:00
wantError : true ,
2016-09-17 00:19:23 -04:00
} ,
{
2016-12-12 15:02:51 -05:00
name : "Fetch and verify" ,
2019-08-26 13:21:52 -04:00
args : "test/signtest --verify --keyring testdata/helm-test-key.pub" ,
2016-12-12 15:02:51 -05:00
expectFile : "./signtest-0.1.0.tgz" ,
expectVerify : true ,
2020-02-28 12:32:45 -05:00
expectSha : "sha256:e5ef611620fb97704d8751c16bab17fedb68883bfb0edc76f78a70e9173f9b55" ,
2016-09-17 00:19:23 -04:00
} ,
{
name : "Fetch and fail verify" ,
2019-08-26 13:21:52 -04:00
args : "test/reqtest --verify --keyring testdata/helm-test-key.pub" ,
2016-09-17 00:19:23 -04:00
failExpect : "Failed to fetch provenance" ,
2018-05-09 11:37:20 -04:00
wantError : true ,
2016-09-17 00:19:23 -04:00
} ,
{
name : "Fetch and untar" ,
2019-08-26 13:21:52 -04:00
args : "test/signtest --untar --untardir signtest" ,
2016-09-17 00:19:23 -04:00
expectFile : "./signtest" ,
expectDir : true ,
} ,
2020-01-10 10:01:59 -05:00
{
name : "Fetch untar when file with same name existed" ,
args : "test/test1 --untar --untardir test1" ,
2025-11-06 09:42:26 -05:00
existFile : "test1/test1" ,
2020-01-10 10:01:59 -05:00
wantError : true ,
2025-11-06 09:42:26 -05:00
wantErrorMsg : fmt . Sprintf ( "failed to untar: a file or directory with the name %s already exists" , filepath . Join ( srv . Root ( ) , "test1" , "test1" ) ) ,
2020-01-10 10:01:59 -05:00
} ,
{
name : "Fetch untar when dir with same name existed" ,
2025-11-06 09:42:26 -05:00
args : "test/test --untar --untardir test2" ,
existDir : "test2/test" ,
2020-01-10 10:01:59 -05:00
wantError : true ,
2025-11-06 09:42:26 -05:00
wantErrorMsg : fmt . Sprintf ( "failed to untar: a file or directory with the name %s already exists" , filepath . Join ( srv . Root ( ) , "test2" , "test" ) ) ,
2020-01-10 10:01:59 -05:00
} ,
2016-09-17 00:19:23 -04:00
{
2016-12-12 15:02:51 -05:00
name : "Fetch, verify, untar" ,
2020-01-10 10:01:59 -05:00
args : "test/signtest --verify --keyring=testdata/helm-test-key.pub --untar --untardir signtest2" ,
expectFile : "./signtest2" ,
2016-12-12 15:02:51 -05:00
expectDir : true ,
expectVerify : true ,
2020-02-28 12:32:45 -05:00
expectSha : "sha256:e5ef611620fb97704d8751c16bab17fedb68883bfb0edc76f78a70e9173f9b55" ,
2016-09-17 00:19:23 -04:00
} ,
2017-05-02 19:39:51 -04:00
{
name : "Chart fetch using repo URL" ,
expectFile : "./signtest-0.1.0.tgz" ,
2019-08-26 13:21:52 -04:00
args : "signtest --repo " + srv . URL ( ) ,
2017-05-02 19:39:51 -04:00
} ,
{
name : "Fail fetching non-existent chart on repo URL" ,
2019-08-26 13:21:52 -04:00
args : "someChart --repo " + srv . URL ( ) ,
2017-05-02 19:39:51 -04:00
failExpect : "Failed to fetch chart" ,
2018-05-09 11:37:20 -04:00
wantError : true ,
2017-05-02 19:39:51 -04:00
} ,
{
name : "Specific version chart fetch using repo URL" ,
expectFile : "./signtest-0.1.0.tgz" ,
2019-08-26 13:21:52 -04:00
args : "signtest --version=0.1.0 --repo " + srv . URL ( ) ,
2017-05-02 19:39:51 -04:00
} ,
{
name : "Specific version chart fetch using repo URL" ,
2019-08-26 13:21:52 -04:00
args : "signtest --version=0.2.0 --repo " + srv . URL ( ) ,
2017-05-02 19:39:51 -04:00
failExpect : "Failed to fetch chart version" ,
2018-05-09 11:37:20 -04:00
wantError : true ,
2017-05-02 19:39:51 -04:00
} ,
2025-07-10 08:56:11 -04:00
{
name : "Chart fetch using repo URL with untardir" ,
args : "signtest --version=0.1.0 --untar --untardir repo-url-test --repo " + srv . URL ( ) ,
expectFile : "./signtest" ,
expectDir : true ,
} ,
{
name : "Chart fetch using repo URL with untardir and previous pull" ,
args : "signtest --version=0.1.0 --untar --untardir repo-url-test --repo " + srv . URL ( ) ,
failExpect : "failed to untar" ,
wantError : true ,
} ,
2020-10-01 17:37:44 -04:00
{
name : "Fetch OCI Chart" ,
args : fmt . Sprintf ( "oci://%s/u/ocitestuser/oci-dependent-chart --version 0.1.0" , ociSrv . RegistryURL ) ,
expectFile : "./oci-dependent-chart-0.1.0.tgz" ,
} ,
{
name : "Fetch OCI Chart with untar" ,
args : fmt . Sprintf ( "oci://%s/u/ocitestuser/oci-dependent-chart --version 0.1.0 --untar" , ociSrv . RegistryURL ) ,
expectFile : "./oci-dependent-chart" ,
expectDir : true ,
} ,
{
name : "Fetch OCI Chart with untar and untardir" ,
args : fmt . Sprintf ( "oci://%s/u/ocitestuser/oci-dependent-chart --version 0.1.0 --untar --untardir ocitest2" , ociSrv . RegistryURL ) ,
expectFile : "./ocitest2" ,
expectDir : true ,
} ,
{
name : "OCI Fetch untar when dir with same name existed" ,
2025-11-06 09:42:26 -05:00
args : fmt . Sprintf ( "oci://%s/u/ocitestuser/oci-dependent-chart --version 0.1.0 --untar --untardir ocitest2" , ociSrv . RegistryURL ) ,
existDir : "ocitest2/oci-dependent-chart" ,
2020-10-01 17:37:44 -04:00
wantError : true ,
2025-11-06 09:42:26 -05:00
wantErrorMsg : fmt . Sprintf ( "failed to untar: a file or directory with the name %s already exists" , filepath . Join ( srv . Root ( ) , "ocitest2" , "oci-dependent-chart" ) ) ,
2020-10-01 17:37:44 -04:00
} ,
{
name : "Fail fetching non-existent OCI chart" ,
args : fmt . Sprintf ( "oci://%s/u/ocitestuser/nosuchthing --version 0.1.0" , ociSrv . RegistryURL ) ,
failExpect : "Failed to fetch" ,
wantError : true ,
} ,
{
2025-11-06 09:42:26 -05:00
name : "Fail fetching OCI chart without version specified" ,
args : fmt . Sprintf ( "oci://%s/u/ocitestuser/nosuchthing" , ociSrv . RegistryURL ) ,
wantError : true ,
2020-10-01 17:37:44 -04:00
} ,
{
2024-09-20 11:47:39 -04:00
name : "Fetching OCI chart without version option specified" ,
args : fmt . Sprintf ( "oci://%s/u/ocitestuser/oci-dependent-chart:0.1.0" , ociSrv . RegistryURL ) ,
expectFile : "./oci-dependent-chart-0.1.0.tgz" ,
2020-10-01 17:37:44 -04:00
} ,
{
2024-09-20 11:47:39 -04:00
name : "Fetching OCI chart with version specified" ,
args : fmt . Sprintf ( "oci://%s/u/ocitestuser/oci-dependent-chart:0.1.0 --version 0.1.0" , ociSrv . RegistryURL ) ,
expectFile : "./oci-dependent-chart-0.1.0.tgz" ,
} ,
{
name : "Fail fetching OCI chart with version mismatch" ,
args : fmt . Sprintf ( "oci://%s/u/ocitestuser/oci-dependent-chart:0.2.0 --version 0.1.0" , ociSrv . RegistryURL ) ,
2025-11-06 09:42:26 -05:00
wantErrorMsg : "chart reference and version mismatch: 0.1.0 is not 0.2.0" ,
2024-09-20 11:47:39 -04:00
wantError : true ,
2020-10-01 17:37:44 -04:00
} ,
2016-09-17 00:19:23 -04:00
}
2016-05-04 16:46:56 -04:00
2025-08-21 14:25:55 -04:00
contentCache := t . TempDir ( )
2019-08-23 02:31:50 -04:00
for _ , tt := range tests {
t . Run ( tt . name , func ( t * testing . T ) {
2019-08-26 13:21:52 -04:00
outdir := srv . Root ( )
2025-08-21 14:25:55 -04:00
cmd := fmt . Sprintf ( "fetch %s -d '%s' --repository-config %s --repository-cache %s --registry-config %s --content-cache %s --plain-http" ,
2019-08-26 13:21:52 -04:00
tt . args ,
outdir ,
filepath . Join ( outdir , "repositories.yaml" ) ,
outdir ,
2020-10-01 17:37:44 -04:00
filepath . Join ( outdir , "config.json" ) ,
2025-08-21 14:25:55 -04:00
contentCache ,
2019-08-26 13:21:52 -04:00
)
2020-01-10 10:01:59 -05:00
// Create file or Dir before helm pull --untar, see: https://github.com/helm/helm/issues/7182
if tt . existFile != "" {
file := filepath . Join ( outdir , tt . existFile )
2025-11-06 09:42:26 -05:00
if err := os . MkdirAll ( filepath . Dir ( file ) , 0755 ) ; err != nil {
t . Fatal ( err )
}
2020-01-10 10:01:59 -05:00
_ , err := os . Create ( file )
if err != nil {
2020-10-01 17:37:44 -04:00
t . Fatal ( err )
2020-01-10 10:01:59 -05:00
}
}
if tt . existDir != "" {
file := filepath . Join ( outdir , tt . existDir )
2025-11-06 09:42:26 -05:00
err := os . MkdirAll ( file , 0755 )
2020-01-10 10:01:59 -05:00
if err != nil {
t . Fatal ( err )
}
}
2019-08-23 02:31:50 -04:00
_ , out , err := executeActionCommand ( cmd )
if err != nil {
if tt . wantError {
2025-11-06 09:42:26 -05:00
if tt . wantErrorMsg != "" && tt . wantErrorMsg != err . Error ( ) {
t . Fatalf ( "Actual error '%s', not equal to expected error '%s'" , err , tt . wantErrorMsg )
2020-01-10 10:01:59 -05:00
}
2019-08-23 02:31:50 -04:00
return
}
t . Fatalf ( "%q reported error: %s" , tt . name , err )
2016-09-17 00:19:23 -04:00
}
2018-05-09 11:37:20 -04:00
2019-08-23 02:31:50 -04:00
if tt . expectVerify {
2020-02-28 12:32:45 -05:00
outString := helmTestKeyOut + tt . expectSha + "\n"
if out != outString {
t . Errorf ( "%q: expected verification output %q, got %q" , tt . name , outString , out )
2019-08-23 02:31:50 -04:00
}
2020-02-28 12:32:45 -05:00
2016-12-12 15:02:51 -05:00
}
2016-05-04 16:46:56 -04:00
2019-08-23 02:31:50 -04:00
ef := filepath . Join ( outdir , tt . expectFile )
fi , err := os . Stat ( ef )
if err != nil {
t . Errorf ( "%q: expected a file at %s. %s" , tt . name , ef , err )
}
if fi . IsDir ( ) != tt . expectDir {
t . Errorf ( "%q: expected directory=%t, but it's not." , tt . name , tt . expectDir )
}
} )
2016-05-04 16:46:56 -04:00
}
}
2020-06-12 08:24:55 -04:00
2025-08-07 08:16:07 -04:00
// runPullTests is a helper function to run pull command tests with common logic
func runPullTests ( t * testing . T , tests [ ] struct {
name string
args string
existFile string
existDir string
wantError bool
wantErrorMsg string
expectFile string
expectDir bool
} , outdir string , additionalFlags string ) {
2025-08-07 08:31:18 -04:00
t . Helper ( )
2025-08-07 08:16:07 -04:00
for _ , tt := range tests {
t . Run ( tt . name , func ( t * testing . T ) {
cmd := fmt . Sprintf ( "pull %s -d '%s' --repository-config %s --repository-cache %s --registry-config %s %s" ,
tt . args ,
outdir ,
filepath . Join ( outdir , "repositories.yaml" ) ,
outdir ,
filepath . Join ( outdir , "config.json" ) ,
additionalFlags ,
)
// Create file or Dir before helm pull --untar, see: https://github.com/helm/helm/issues/7182
if tt . existFile != "" {
file := filepath . Join ( outdir , tt . existFile )
_ , err := os . Create ( file )
if err != nil {
t . Fatal ( err )
}
}
if tt . existDir != "" {
file := filepath . Join ( outdir , tt . existDir )
2025-11-06 09:42:26 -05:00
err := os . MkdirAll ( file , 0755 )
2025-08-07 08:16:07 -04:00
if err != nil {
t . Fatal ( err )
}
}
_ , _ , err := executeActionCommand ( cmd )
2025-11-06 09:42:26 -05:00
if tt . wantError && err == nil {
t . Fatalf ( "%q: expected error but got none" , tt . name )
}
2025-08-07 08:16:07 -04:00
if err != nil {
if tt . wantError {
2025-11-06 09:42:26 -05:00
if tt . wantErrorMsg != "" && tt . wantErrorMsg != err . Error ( ) {
t . Fatalf ( "Actual error '%s', not equal to expected error '%s'" , err , tt . wantErrorMsg )
2025-08-07 08:16:07 -04:00
}
return
}
t . Fatalf ( "%q reported error: %s" , tt . name , err )
}
ef := filepath . Join ( outdir , tt . expectFile )
fi , err := os . Stat ( ef )
if err != nil {
t . Errorf ( "%q: expected a file at %s. %s" , tt . name , ef , err )
}
if fi . IsDir ( ) != tt . expectDir {
t . Errorf ( "%q: expected directory=%t, but it's not." , tt . name , tt . expectDir )
}
} )
}
}
// buildOCIURL is a helper function to build OCI URLs with credentials
func buildOCIURL ( registryURL , chartName , version , username , password string ) string {
baseURL := fmt . Sprintf ( "oci://%s/u/ocitestuser/%s" , registryURL , chartName )
if version != "" {
baseURL += fmt . Sprintf ( " --version %s" , version )
}
if username != "" && password != "" {
baseURL += fmt . Sprintf ( " --username %s --password %s" , username , password )
}
return baseURL
}
2021-06-11 14:36:55 -04:00
func TestPullWithCredentialsCmd ( t * testing . T ) {
2024-12-01 02:46:18 -05:00
srv := repotest . NewTempServer (
t ,
repotest . WithChartSourceGlob ( "testdata/testcharts/*.tgz*" ) ,
repotest . WithMiddleware ( repotest . BasicAuthMiddleware ( t ) ) ,
)
2021-06-11 14:36:55 -04:00
defer srv . Stop ( )
srv2 := httptest . NewServer ( http . HandlerFunc ( func ( w http . ResponseWriter , r * http . Request ) {
http . FileServer ( http . Dir ( srv . Root ( ) ) ) . ServeHTTP ( w , r )
} ) )
defer srv2 . Close ( )
if err := srv . LinkIndices ( ) ; err != nil {
t . Fatal ( err )
}
// all flags will get "-d outdir" appended.
tests := [ ] struct {
name string
args string
existFile string
existDir string
wantError bool
wantErrorMsg string
expectFile string
expectDir bool
} {
{
name : "Chart fetch using repo URL" ,
expectFile : "./signtest-0.1.0.tgz" ,
args : "signtest --repo " + srv . URL ( ) + " --username username --password password" ,
} ,
{
name : "Fail fetching non-existent chart on repo URL" ,
args : "someChart --repo " + srv . URL ( ) + " --username username --password password" ,
wantError : true ,
} ,
{
name : "Specific version chart fetch using repo URL" ,
expectFile : "./signtest-0.1.0.tgz" ,
args : "signtest --version=0.1.0 --repo " + srv . URL ( ) + " --username username --password password" ,
} ,
{
name : "Specific version chart fetch using repo URL" ,
args : "signtest --version=0.2.0 --repo " + srv . URL ( ) + " --username username --password password" ,
wantError : true ,
} ,
{
name : "Chart located on different domain with credentials passed" ,
args : "reqtest --repo " + srv2 . URL + " --username username --password password --pass-credentials" ,
expectFile : "./reqtest-0.1.0.tgz" ,
} ,
}
2025-08-07 08:16:07 -04:00
runPullTests ( t , tests , srv . Root ( ) , "" )
2021-06-11 14:36:55 -04:00
}
2020-06-12 08:24:55 -04:00
func TestPullVersionCompletion ( t * testing . T ) {
repoFile := "testdata/helmhome/helm/repositories.yaml"
repoCache := "testdata/helmhome/helm/repository"
repoSetup := fmt . Sprintf ( "--repository-config %s --repository-cache %s" , repoFile , repoCache )
tests := [ ] cmdTestCase { {
name : "completion for pull version flag" ,
cmd : fmt . Sprintf ( "%s __complete pull testing/alpine --version ''" , repoSetup ) ,
golden : "output/version-comp.txt" ,
2021-12-31 10:49:49 -05:00
} , {
name : "completion for pull version flag, no filter" ,
cmd : fmt . Sprintf ( "%s __complete pull testing/alpine --version 0.3" , repoSetup ) ,
golden : "output/version-comp.txt" ,
2020-06-12 08:24:55 -04:00
} , {
name : "completion for pull version flag too few args" ,
cmd : fmt . Sprintf ( "%s __complete pull --version ''" , repoSetup ) ,
golden : "output/version-invalid-comp.txt" ,
} , {
name : "completion for pull version flag too many args" ,
cmd : fmt . Sprintf ( "%s __complete pull testing/alpine badarg --version ''" , repoSetup ) ,
golden : "output/version-invalid-comp.txt" ,
} , {
name : "completion for pull version flag invalid chart" ,
cmd : fmt . Sprintf ( "%s __complete pull invalid/invalid --version ''" , repoSetup ) ,
golden : "output/version-invalid-comp.txt" ,
} }
runTestCmd ( t , tests )
}
2020-08-08 03:43:34 -04:00
2025-08-07 08:16:07 -04:00
func TestPullWithCredentialsCmdOCIRegistry ( t * testing . T ) {
srv := repotest . NewTempServer (
t ,
repotest . WithChartSourceGlob ( "testdata/testcharts/*.tgz*" ) ,
)
defer srv . Stop ( )
ociSrv , err := repotest . NewOCIServer ( t , srv . Root ( ) )
if err != nil {
t . Fatal ( err )
}
ociSrv . Run ( t )
if err := srv . LinkIndices ( ) ; err != nil {
t . Fatal ( err )
}
// all flags will get "-d outdir" appended.
tests := [ ] struct {
name string
args string
existFile string
existDir string
wantError bool
wantErrorMsg string
expectFile string
expectDir bool
} {
{
name : "OCI Chart fetch with credentials" ,
args : buildOCIURL ( ociSrv . RegistryURL , "oci-dependent-chart" , "0.1.0" , ociSrv . TestUsername , ociSrv . TestPassword ) ,
expectFile : "./oci-dependent-chart-0.1.0.tgz" ,
} ,
{
name : "OCI Chart fetch with credentials and untar" ,
args : buildOCIURL ( ociSrv . RegistryURL , "oci-dependent-chart" , "0.1.0" , ociSrv . TestUsername , ociSrv . TestPassword ) + " --untar" ,
expectFile : "./oci-dependent-chart" ,
expectDir : true ,
} ,
{
name : "OCI Chart fetch with credentials and untardir" ,
args : buildOCIURL ( ociSrv . RegistryURL , "oci-dependent-chart" , "0.1.0" , ociSrv . TestUsername , ociSrv . TestPassword ) + " --untar --untardir ocitest-credentials" ,
expectFile : "./ocitest-credentials" ,
expectDir : true ,
} ,
{
name : "Fail fetching OCI chart with wrong credentials" ,
args : buildOCIURL ( ociSrv . RegistryURL , "oci-dependent-chart" , "0.1.0" , "wronguser" , "wrongpass" ) ,
wantError : true ,
} ,
{
name : "Fail fetching non-existent OCI chart with credentials" ,
args : buildOCIURL ( ociSrv . RegistryURL , "nosuchthing" , "0.1.0" , ociSrv . TestUsername , ociSrv . TestPassword ) ,
wantError : true ,
} ,
{
2025-11-06 09:42:26 -05:00
name : "Fail fetching OCI chart without version specified" ,
args : buildOCIURL ( ociSrv . RegistryURL , "nosuchthing" , "" , ociSrv . TestUsername , ociSrv . TestPassword ) ,
wantError : true ,
2025-08-07 08:16:07 -04:00
} ,
}
runPullTests ( t , tests , srv . Root ( ) , "--plain-http" )
}
2020-08-08 03:43:34 -04:00
func TestPullFileCompletion ( t * testing . T ) {
checkFileCompletion ( t , "pull" , false )
checkFileCompletion ( t , "pull repo/chart" , false )
}