diff options
author | Cypher <cypher@server.ky> | 2023-09-29 08:16:00 -0500 |
---|---|---|
committer | Cypher <cypher@server.ky> | 2023-09-29 08:40:08 -0500 |
commit | d20477b49ef5092ef1fe9e99396495d45b6457a2 (patch) | |
tree | ee4b4ea341973e940c42396489abde90c3770f27 | |
parent | cf7f89b0fb8f36102891e70828df72abe57f6e8b (diff) | |
download | librefund-d20477b49ef5092ef1fe9e99396495d45b6457a2.tar.xz |
Move service testdata into service pkg
The service's testdata should be in the service's domain.
-rw-r--r-- | README.md | 6 | ||||
-rw-r--r-- | service/service_feature_test.go | 4 | ||||
-rw-r--r-- | service/testdata/isolated/etc/librefund.yaml (renamed from testdata/service/etc/librefund.yaml) | 0 | ||||
-rw-r--r-- | service/testdata/isolated/var/project/funding-documentation.yaml (renamed from testdata/service/var/project/funding-documentation.yaml) | 0 | ||||
-rw-r--r-- | service/testdata/isolated/var/project/funding-maintenance.yaml (renamed from testdata/service/var/project/funding-maintenance.yaml) | 0 | ||||
-rw-r--r-- | service/testdata/isolated/var/project/funding.project.yaml (renamed from testdata/service/var/project/funding.project.yaml) | 2 | ||||
l--------- | service/testdata/isolated/var/template | 1 | ||||
-rw-r--r-- | service/testdata/isolated/var/transactions.json (renamed from testdata/service/var/transactions.json) | 0 | ||||
l--------- | testdata/service/var/template | 1 |
9 files changed, 7 insertions, 7 deletions
@@ -81,9 +81,9 @@ go test ./... ## Try it out -You can can give librefund a quick spin by using the project's [test service data](`./testdata/service`). +You can can give librefund a quick spin by using the project's [test service data](`./service/testdata`). ``` -cd ./testdata/service -go run ../../cmd/librefund +cd ./service/testdata/isolated +go run ../../../cmd/librefund ``` diff --git a/service/service_feature_test.go b/service/service_feature_test.go index 62b1d86..b3116cd 100644 --- a/service/service_feature_test.go +++ b/service/service_feature_test.go @@ -12,7 +12,7 @@ import ( func TestContributingAndCancellingAnObjective(t *testing.T) { projectRoot := t.TempDir() - err := exec.Command("cp", "--recursive", "../testdata/service/.", projectRoot).Run() + err := exec.Command("cp", "--recursive", "testdata/isolated/.", projectRoot).Run() require.NoError(t, err, "copying project files") testDir, err := os.Getwd() @@ -78,7 +78,7 @@ func TestContributingAndCancellingAnObjective(t *testing.T) { func TestContributingAndClaimingAnObjective(t *testing.T) { projectRoot := t.TempDir() - output, err := exec.Command("cp", "--recursive", "../testdata/service/.", projectRoot).CombinedOutput() + output, err := exec.Command("cp", "--recursive", "testdata/isolated/.", projectRoot).CombinedOutput() require.NoErrorf(t, err, "copying project files: %s", string(output)) testDir, err := os.Getwd() diff --git a/testdata/service/etc/librefund.yaml b/service/testdata/isolated/etc/librefund.yaml index 3d6cd3f..3d6cd3f 100644 --- a/testdata/service/etc/librefund.yaml +++ b/service/testdata/isolated/etc/librefund.yaml diff --git a/testdata/service/var/project/funding-documentation.yaml b/service/testdata/isolated/var/project/funding-documentation.yaml index c961f82..c961f82 100644 --- a/testdata/service/var/project/funding-documentation.yaml +++ b/service/testdata/isolated/var/project/funding-documentation.yaml diff --git a/testdata/service/var/project/funding-maintenance.yaml b/service/testdata/isolated/var/project/funding-maintenance.yaml index c668b52..c668b52 100644 --- a/testdata/service/var/project/funding-maintenance.yaml +++ b/service/testdata/isolated/var/project/funding-maintenance.yaml diff --git a/testdata/service/var/project/funding.project.yaml b/service/testdata/isolated/var/project/funding.project.yaml index a9e3aa6..be71d40 100644 --- a/testdata/service/var/project/funding.project.yaml +++ b/service/testdata/isolated/var/project/funding.project.yaml @@ -1,6 +1,6 @@ id: 62bae831-ebab-4d89-96c5-8c0bd25f9bf8 name: funding -home: https://git.sr.ht/~cypher/funding +home: https://git.server.ky/cypher/librefund description: A more collaborative approach for funding Free Software projects. updates: - createdat: 2020-07-13T02:59:43.1Z diff --git a/service/testdata/isolated/var/template b/service/testdata/isolated/var/template new file mode 120000 index 0000000..18f9172 --- /dev/null +++ b/service/testdata/isolated/var/template @@ -0,0 +1 @@ +../../../../asset/template
\ No newline at end of file diff --git a/testdata/service/var/transactions.json b/service/testdata/isolated/var/transactions.json index e69de29..e69de29 100644 --- a/testdata/service/var/transactions.json +++ b/service/testdata/isolated/var/transactions.json diff --git a/testdata/service/var/template b/testdata/service/var/template deleted file mode 120000 index 877ce36..0000000 --- a/testdata/service/var/template +++ /dev/null @@ -1 +0,0 @@ -../../../asset/template
\ No newline at end of file |