From efc5a3267fef3bd78310f7d0ed6f00f12bbd5a81 Mon Sep 17 00:00:00 2001 From: Tyrel Souza Date: Tue, 14 May 2019 23:20:16 -0400 Subject: [PATCH] starting config parsing --- README.md | 6 +++--- manifests_test.go | 4 ++-- test/{fixtures => good_config}/.tidelift.yml | 0 test/{fixtures => good_config}/Gemfile | 0 .../a/b/c/d/e/f/g/requirements.txt | 0 test/{fixtures => good_config}/notamanifest | 0 test/{fixtures => good_config}/subdir/requirements.txt | 0 test/{fixtures => good_config}/yarn.lock | 0 8 files changed, 5 insertions(+), 5 deletions(-) rename test/{fixtures => good_config}/.tidelift.yml (100%) rename test/{fixtures => good_config}/Gemfile (100%) rename test/{fixtures => good_config}/a/b/c/d/e/f/g/requirements.txt (100%) rename test/{fixtures => good_config}/notamanifest (100%) rename test/{fixtures => good_config}/subdir/requirements.txt (100%) rename test/{fixtures => good_config}/yarn.lock (100%) diff --git a/README.md b/README.md index 6510505..d565f26 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,12 @@ # Install -Using go >= 1.12 +Using go >= 1.12 so we have go modules. ``` $ go get $ go build $ go test -$ ./tideliftcli scan ~/test - test/fixtures/yarn.lock, test/fixtures/Gemfile, test/fixtures/subdir/requirements.txt, test/fixtures/a/b/c/d/e/f/g/requirements.txt +$ ./tideliftcli scan ~/test/good_fixtures + yarn.lock, Gemfile, subdir/requirements.txt, a/b/c/d/e/f/g/requirements.txt ``` diff --git a/manifests_test.go b/manifests_test.go index 597aac0..4a3bf13 100644 --- a/manifests_test.go +++ b/manifests_test.go @@ -10,7 +10,7 @@ import ( func TestGetListOfGlobMatches(t *testing.T) { //assert getManifestMatches gets all requirements.txt - os.Chdir("test/fixtures") + os.Chdir("test/good_config") expected := []string{ "subdir/requirements.txt", "a/b/c/d/e/f/g/requirements.txt", @@ -29,7 +29,7 @@ func TestGetListOfManifestFilenames(t *testing.T) { "a/b/c/d/e/f/g/requirements.txt", "subdir/requirements.txt", } - got := getListOfManifestFilenames("test/fixtures") + got := getListOfManifestFilenames("test/good_config") sort.Strings(expected) sort.Strings(got) diff --git a/test/fixtures/.tidelift.yml b/test/good_config/.tidelift.yml similarity index 100% rename from test/fixtures/.tidelift.yml rename to test/good_config/.tidelift.yml diff --git a/test/fixtures/Gemfile b/test/good_config/Gemfile similarity index 100% rename from test/fixtures/Gemfile rename to test/good_config/Gemfile diff --git a/test/fixtures/a/b/c/d/e/f/g/requirements.txt b/test/good_config/a/b/c/d/e/f/g/requirements.txt similarity index 100% rename from test/fixtures/a/b/c/d/e/f/g/requirements.txt rename to test/good_config/a/b/c/d/e/f/g/requirements.txt diff --git a/test/fixtures/notamanifest b/test/good_config/notamanifest similarity index 100% rename from test/fixtures/notamanifest rename to test/good_config/notamanifest diff --git a/test/fixtures/subdir/requirements.txt b/test/good_config/subdir/requirements.txt similarity index 100% rename from test/fixtures/subdir/requirements.txt rename to test/good_config/subdir/requirements.txt diff --git a/test/fixtures/yarn.lock b/test/good_config/yarn.lock similarity index 100% rename from test/fixtures/yarn.lock rename to test/good_config/yarn.lock