Skip to content
Permalink
Browse files

fix the goline issue, 'gitUrl' to 'gitURL'

  • Loading branch information
kanozec committed Dec 3, 2019
1 parent 2a5010a commit 2c7c681ee4659cb3ecf5722d9f7fabbf79d73be7
Showing with 15 additions and 15 deletions.
  1. +15 −15 pkg/volume/git_repo/git_repo_test.go
@@ -70,7 +70,7 @@ type expectedCommand struct {
}

func TestPlugin(t *testing.T) {
gitUrl := "https://github.com/kubernetes/kubernetes.git"
gitURL := "https://github.com/kubernetes/kubernetes.git"
revision := "2a30ce65c5ab586b98916d83385c5983edd353a1"

scenarios := []struct {
@@ -85,15 +85,15 @@ func TestPlugin(t *testing.T) {
Name: "vol1",
VolumeSource: v1.VolumeSource{
GitRepo: &v1.GitRepoVolumeSource{
Repository: gitUrl,
Repository: gitURL,
Revision: revision,
Directory: "target_dir",
},
},
},
expecteds: []expectedCommand{
{
cmd: []string{"git", "clone", "--", gitUrl, "target_dir"},
cmd: []string{"git", "clone", "--", gitURL, "target_dir"},
dir: "",
},
{
@@ -113,14 +113,14 @@ func TestPlugin(t *testing.T) {
Name: "vol1",
VolumeSource: v1.VolumeSource{
GitRepo: &v1.GitRepoVolumeSource{
Repository: gitUrl,
Repository: gitURL,
Directory: "target_dir",
},
},
},
expecteds: []expectedCommand{
{
cmd: []string{"git", "clone", "--", gitUrl, "target_dir"},
cmd: []string{"git", "clone", "--", gitURL, "target_dir"},
dir: "",
},
},
@@ -132,13 +132,13 @@ func TestPlugin(t *testing.T) {
Name: "vol1",
VolumeSource: v1.VolumeSource{
GitRepo: &v1.GitRepoVolumeSource{
Repository: gitUrl,
Repository: gitURL,
},
},
},
expecteds: []expectedCommand{
{
cmd: []string{"git", "clone", "--", gitUrl},
cmd: []string{"git", "clone", "--", gitURL},
dir: "",
},
},
@@ -150,15 +150,15 @@ func TestPlugin(t *testing.T) {
Name: "vol1",
VolumeSource: v1.VolumeSource{
GitRepo: &v1.GitRepoVolumeSource{
Repository: gitUrl,
Repository: gitURL,
Revision: revision,
Directory: "",
},
},
},
expecteds: []expectedCommand{
{
cmd: []string{"git", "clone", "--", gitUrl},
cmd: []string{"git", "clone", "--", gitURL},
dir: "",
},
{
@@ -178,15 +178,15 @@ func TestPlugin(t *testing.T) {
Name: "vol1",
VolumeSource: v1.VolumeSource{
GitRepo: &v1.GitRepoVolumeSource{
Repository: gitUrl,
Repository: gitURL,
Revision: revision,
Directory: ".",
},
},
},
expecteds: []expectedCommand{
{
cmd: []string{"git", "clone", "--", gitUrl, "."},
cmd: []string{"git", "clone", "--", gitURL, "."},
dir: "",
},
{
@@ -206,15 +206,15 @@ func TestPlugin(t *testing.T) {
Name: "vol1",
VolumeSource: v1.VolumeSource{
GitRepo: &v1.GitRepoVolumeSource{
Repository: gitUrl,
Repository: gitURL,
Revision: revision,
Directory: "./.",
},
},
},
expecteds: []expectedCommand{
{
cmd: []string{"git", "clone", "--", gitUrl, "./."},
cmd: []string{"git", "clone", "--", gitURL, "./."},
dir: "",
},
{
@@ -246,7 +246,7 @@ func TestPlugin(t *testing.T) {
Name: "vol1",
VolumeSource: v1.VolumeSource{
GitRepo: &v1.GitRepoVolumeSource{
Repository: gitUrl,
Repository: gitURL,
Revision: "--bar",
},
},
@@ -259,7 +259,7 @@ func TestPlugin(t *testing.T) {
Name: "vol1",
VolumeSource: v1.VolumeSource{
GitRepo: &v1.GitRepoVolumeSource{
Repository: gitUrl,
Repository: gitURL,
Directory: "-b",
},
},

0 comments on commit 2c7c681

Please sign in to comment.
You can’t perform that action at this time.