summaryrefslogtreecommitdiff
path: root/internal/resource/resource_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/resource/resource_test.go')
-rw-r--r--internal/resource/resource_test.go12
1 files changed, 4 insertions, 8 deletions
diff --git a/internal/resource/resource_test.go b/internal/resource/resource_test.go
index 8741f2a..23be8cc 100644
--- a/internal/resource/resource_test.go
+++ b/internal/resource/resource_test.go
@@ -5,7 +5,7 @@ import (
)
func TestResourceID(t *testing.T) {
- resetRepository()
+ ResetRepository()
res := Register("File", "/tmp/foo.txt", &mockApplier{})
expected := "File[/tmp/foo.txt]"
if res.ID() != expected {
@@ -14,7 +14,7 @@ func TestResourceID(t *testing.T) {
}
func TestResourceString(t *testing.T) {
- resetRepository()
+ ResetRepository()
res := Register("File", "/tmp/foo.txt", &mockApplier{})
expected := "File[/tmp/foo.txt]"
if res.String() != expected {
@@ -23,7 +23,7 @@ func TestResourceString(t *testing.T) {
}
func TestNew(t *testing.T) {
- resetRepository()
+ ResetRepository()
type_ := "File"
name := "/tmp/foo.txt"
res := Register(type_, name, &mockApplier{})
@@ -40,7 +40,7 @@ func TestNew(t *testing.T) {
}
func TestRepositoryRegister(t *testing.T) {
- resetRepository()
+ ResetRepository()
repo := getRepository()
res := Register("File", "/tmp/foo.txt", &mockApplier{})
@@ -56,7 +56,3 @@ func TestRepositoryRegister(t *testing.T) {
t.Error("expected error when registering the same resource twice, got nil")
}
}
-
-type mockApplier struct{}
-
-func (m *mockApplier) Apply() error { return nil }