From d081f1a9e82cbc01ff32ca3cf7bd79e104e7af18 Mon Sep 17 00:00:00 2001 From: Jonathan Hope Date: Mon, 27 May 2024 09:04:47 -0700 Subject: [PATCH] refactor: move bdd --- Taskfile.yml | 5 ----- cmd/cli/{cmd => internal}/cmd.go | 0 cmd/cli/{cmd => internal}/context.go | 0 cmd/cli/{cmd => internal}/errors.go | 0 cmd/cli/{cmd => internal}/formatters.go | 0 cmd/cli/main.go | 2 +- {test => cmd/cli/test}/README.org | 0 {test => cmd/cli/test}/armaria_test.go | 0 {test => cmd/cli/test}/features/cli_add_book.feature | 0 {test => cmd/cli/test}/features/cli_add_folder.feature | 0 {test => cmd/cli/test}/features/cli_add_tag.feature | 0 {test => cmd/cli/test}/features/cli_get_book.feature | 0 {test => cmd/cli/test}/features/cli_get_parent_names.feature | 0 {test => cmd/cli/test}/features/cli_list_all.feature | 0 {test => cmd/cli/test}/features/cli_list_books.feature | 0 {test => cmd/cli/test}/features/cli_list_folders.feature | 0 {test => cmd/cli/test}/features/cli_list_tags.feature | 0 {test => cmd/cli/test}/features/cli_query.feature | 0 {test => cmd/cli/test}/features/cli_remove_book.feature | 0 {test => cmd/cli/test}/features/cli_remove_folder.feature | 0 {test => cmd/cli/test}/features/cli_remove_tag.feature | 0 {test => cmd/cli/test}/features/cli_update_book.feature | 0 {test => cmd/cli/test}/features/cli_update_folder.feature | 0 {test => cmd/cli/test}/steps.go | 2 +- {test => cmd/cli/test}/test_helpers.go | 2 +- 25 files changed, 3 insertions(+), 8 deletions(-) rename cmd/cli/{cmd => internal}/cmd.go (100%) rename cmd/cli/{cmd => internal}/context.go (100%) rename cmd/cli/{cmd => internal}/errors.go (100%) rename cmd/cli/{cmd => internal}/formatters.go (100%) rename {test => cmd/cli/test}/README.org (100%) rename {test => cmd/cli/test}/armaria_test.go (100%) rename {test => cmd/cli/test}/features/cli_add_book.feature (100%) rename {test => cmd/cli/test}/features/cli_add_folder.feature (100%) rename {test => cmd/cli/test}/features/cli_add_tag.feature (100%) rename {test => cmd/cli/test}/features/cli_get_book.feature (100%) rename {test => cmd/cli/test}/features/cli_get_parent_names.feature (100%) rename {test => cmd/cli/test}/features/cli_list_all.feature (100%) rename {test => cmd/cli/test}/features/cli_list_books.feature (100%) rename {test => cmd/cli/test}/features/cli_list_folders.feature (100%) rename {test => cmd/cli/test}/features/cli_list_tags.feature (100%) rename {test => cmd/cli/test}/features/cli_query.feature (100%) rename {test => cmd/cli/test}/features/cli_remove_book.feature (100%) rename {test => cmd/cli/test}/features/cli_remove_folder.feature (100%) rename {test => cmd/cli/test}/features/cli_remove_tag.feature (100%) rename {test => cmd/cli/test}/features/cli_update_book.feature (100%) rename {test => cmd/cli/test}/features/cli_update_folder.feature (100%) rename {test => cmd/cli/test}/steps.go (99%) rename {test => cmd/cli/test}/test_helpers.go (99%) diff --git a/Taskfile.yml b/Taskfile.yml index 2eca011..2a68adf 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -4,10 +4,6 @@ tasks: lint: cmds: - golangci-lint run --config .golangci.yml --timeout 3m - test-bdd: - dir: test - cmds: - - go test --tags "fts5" test-internal: dir: internal cmds: @@ -20,7 +16,6 @@ tasks: cmds: - task: test-internal - task : test-cmd - - task: test-bdd build-cli: dir: cmd/cli cmds: diff --git a/cmd/cli/cmd/cmd.go b/cmd/cli/internal/cmd.go similarity index 100% rename from cmd/cli/cmd/cmd.go rename to cmd/cli/internal/cmd.go diff --git a/cmd/cli/cmd/context.go b/cmd/cli/internal/context.go similarity index 100% rename from cmd/cli/cmd/context.go rename to cmd/cli/internal/context.go diff --git a/cmd/cli/cmd/errors.go b/cmd/cli/internal/errors.go similarity index 100% rename from cmd/cli/cmd/errors.go rename to cmd/cli/internal/errors.go diff --git a/cmd/cli/cmd/formatters.go b/cmd/cli/internal/formatters.go similarity index 100% rename from cmd/cli/cmd/formatters.go rename to cmd/cli/internal/formatters.go diff --git a/cmd/cli/main.go b/cmd/cli/main.go index 8ad8de4..dbf8c95 100644 --- a/cmd/cli/main.go +++ b/cmd/cli/main.go @@ -4,7 +4,7 @@ import ( "os" "github.com/alecthomas/kong" - "github.com/jonathanhope/armaria/cmd/cli/cmd" + "github.com/jonathanhope/armaria/cmd/cli/internal" ) var version string diff --git a/test/README.org b/cmd/cli/test/README.org similarity index 100% rename from test/README.org rename to cmd/cli/test/README.org diff --git a/test/armaria_test.go b/cmd/cli/test/armaria_test.go similarity index 100% rename from test/armaria_test.go rename to cmd/cli/test/armaria_test.go diff --git a/test/features/cli_add_book.feature b/cmd/cli/test/features/cli_add_book.feature similarity index 100% rename from test/features/cli_add_book.feature rename to cmd/cli/test/features/cli_add_book.feature diff --git a/test/features/cli_add_folder.feature b/cmd/cli/test/features/cli_add_folder.feature similarity index 100% rename from test/features/cli_add_folder.feature rename to cmd/cli/test/features/cli_add_folder.feature diff --git a/test/features/cli_add_tag.feature b/cmd/cli/test/features/cli_add_tag.feature similarity index 100% rename from test/features/cli_add_tag.feature rename to cmd/cli/test/features/cli_add_tag.feature diff --git a/test/features/cli_get_book.feature b/cmd/cli/test/features/cli_get_book.feature similarity index 100% rename from test/features/cli_get_book.feature rename to cmd/cli/test/features/cli_get_book.feature diff --git a/test/features/cli_get_parent_names.feature b/cmd/cli/test/features/cli_get_parent_names.feature similarity index 100% rename from test/features/cli_get_parent_names.feature rename to cmd/cli/test/features/cli_get_parent_names.feature diff --git a/test/features/cli_list_all.feature b/cmd/cli/test/features/cli_list_all.feature similarity index 100% rename from test/features/cli_list_all.feature rename to cmd/cli/test/features/cli_list_all.feature diff --git a/test/features/cli_list_books.feature b/cmd/cli/test/features/cli_list_books.feature similarity index 100% rename from test/features/cli_list_books.feature rename to cmd/cli/test/features/cli_list_books.feature diff --git a/test/features/cli_list_folders.feature b/cmd/cli/test/features/cli_list_folders.feature similarity index 100% rename from test/features/cli_list_folders.feature rename to cmd/cli/test/features/cli_list_folders.feature diff --git a/test/features/cli_list_tags.feature b/cmd/cli/test/features/cli_list_tags.feature similarity index 100% rename from test/features/cli_list_tags.feature rename to cmd/cli/test/features/cli_list_tags.feature diff --git a/test/features/cli_query.feature b/cmd/cli/test/features/cli_query.feature similarity index 100% rename from test/features/cli_query.feature rename to cmd/cli/test/features/cli_query.feature diff --git a/test/features/cli_remove_book.feature b/cmd/cli/test/features/cli_remove_book.feature similarity index 100% rename from test/features/cli_remove_book.feature rename to cmd/cli/test/features/cli_remove_book.feature diff --git a/test/features/cli_remove_folder.feature b/cmd/cli/test/features/cli_remove_folder.feature similarity index 100% rename from test/features/cli_remove_folder.feature rename to cmd/cli/test/features/cli_remove_folder.feature diff --git a/test/features/cli_remove_tag.feature b/cmd/cli/test/features/cli_remove_tag.feature similarity index 100% rename from test/features/cli_remove_tag.feature rename to cmd/cli/test/features/cli_remove_tag.feature diff --git a/test/features/cli_update_book.feature b/cmd/cli/test/features/cli_update_book.feature similarity index 100% rename from test/features/cli_update_book.feature rename to cmd/cli/test/features/cli_update_book.feature diff --git a/test/features/cli_update_folder.feature b/cmd/cli/test/features/cli_update_folder.feature similarity index 100% rename from test/features/cli_update_folder.feature rename to cmd/cli/test/features/cli_update_folder.feature diff --git a/test/steps.go b/cmd/cli/test/steps.go similarity index 99% rename from test/steps.go rename to cmd/cli/test/steps.go index 69222fa..964a1c5 100644 --- a/test/steps.go +++ b/cmd/cli/test/steps.go @@ -11,7 +11,7 @@ import ( "github.com/cucumber/godog" "github.com/google/go-cmp/cmp" "github.com/google/uuid" - "github.com/jonathanhope/armaria/cmd/cli/cmd" + "github.com/jonathanhope/armaria/cmd/cli/internal" "github.com/jonathanhope/armaria/internal/null" ) diff --git a/test/test_helpers.go b/cmd/cli/test/test_helpers.go similarity index 99% rename from test/test_helpers.go rename to cmd/cli/test/test_helpers.go index c484a4c..592c84e 100644 --- a/test/test_helpers.go +++ b/cmd/cli/test/test_helpers.go @@ -12,7 +12,7 @@ import ( "github.com/cucumber/godog" "github.com/google/shlex" "github.com/google/uuid" - "github.com/jonathanhope/armaria/cmd/cli/cmd" + "github.com/jonathanhope/armaria/cmd/cli/internal" "github.com/jonathanhope/armaria/internal/null" "github.com/jonathanhope/armaria/pkg/api" "github.com/jonathanhope/armaria/pkg/model"