Skip to content
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.

Commit

Permalink
e2e: Fix string type conversions (#3672)
Browse files Browse the repository at this point in the history
Signed-off-by: Delyan Raychev <[email protected]>
  • Loading branch information
draychev authored Jun 25, 2021
1 parent 4af905e commit 65191b3
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/framework/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ func (o OSMDescribeInfo) String() string {

// OSMDescribe givens the description of an e2e test
func OSMDescribe(name string, opts OSMDescribeInfo, body func()) bool {
return Describe(opts.String()+" "+name, body)
return Describe(fmt.Sprintf("%s %s", opts, name), body)
}

// InstallType defines several OSM test deployment scenarios
Expand All @@ -159,7 +159,7 @@ func verifyValidInstallType(t InstallType) error {
return nil
default:
return errors.Errorf("%s is not a valid InstallType (%s, %s, %s) ",
string(t), SelfInstall, KindCluster, NoInstall)
t, SelfInstall, KindCluster, NoInstall)
}
}

Expand All @@ -184,7 +184,7 @@ func verifyValidCollectLogs(t CollectLogsType) error {
return nil
default:
return errors.Errorf("%s is not a valid CollectLogsType (%s, %s, %s)",
string(t), CollectLogs, CollectLogsIfErrorOnly, NoCollectLogs)
t, CollectLogs, CollectLogsIfErrorOnly, NoCollectLogs)
}
}

Expand Down Expand Up @@ -376,12 +376,12 @@ nodeRegistration:

configClient, err := configClientset.NewForConfig(kubeConfig)
if err != nil {
return errors.Wrapf(err, "failed to create %s client", configV1alpha1.SchemeGroupVersion.String())
return errors.Wrapf(err, "failed to create %s client", configV1alpha1.SchemeGroupVersion)
}

policyClient, err := policyV1alpha1Client.NewForConfig(kubeConfig)
if err != nil {
return errors.Wrapf(err, "failed to create %s client", policyV1alpha1.SchemeGroupVersion.String())
return errors.Wrapf(err, "failed to create %s client", policyV1alpha1.SchemeGroupVersion)
}

td.RestConfig = kubeConfig
Expand Down Expand Up @@ -1372,7 +1372,7 @@ func (td *OsmTestData) CreateDockerRegistrySecret(ns string) {
Username: td.CtrRegistryUser,
Password: td.CtrRegistryPassword,
Email: "[email protected]",
Auth: base64.StdEncoding.EncodeToString([]byte(td.CtrRegistryUser + ":" + td.CtrRegistryPassword)),
Auth: base64.StdEncoding.EncodeToString([]byte(fmt.Sprintf("%s:%s", td.CtrRegistryUser, td.CtrRegistryPassword))),
}

dockerCfgJSON := DockerConfigJSON{
Expand Down

0 comments on commit 65191b3

Please sign in to comment.