Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ export AWS_DEFAULT_REGION=<AWS default region>
export AWS_BUCKET=<S3 Bucket name>
export AWS_DYNAMODB_TABLE=<AWS_DYNAMODB_TABLE>

# Spin up the two containers and a network for them to communciate on:
# Spin up the two containers and a network for them to communicate on:
docker network create terraboard
docker run --name db \
-e POSTGRES_USER=gorm \
Expand Down
4 changes: 4 additions & 0 deletions internal/terraform/configs/configload/loader_snapshot.go
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,10 @@ func (fs snapshotFS) Name() string {
return "ConfigSnapshotFS"
}

func (fs snapshotFS) Chown(name string, uid, gid int) error {
return fmt.Errorf("cannot change ownership inside configuaration snapshot")
}

func (fs snapshotFS) Chmod(name string, mode os.FileMode) error {
return fmt.Errorf("cannot set file mode inside configuration snapshot")
}
Expand Down
7 changes: 7 additions & 0 deletions internal/terraform/configs/configload/loader_snapshot_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,3 +140,10 @@ func TestSnapshotRoundtrip(t *testing.T) {
t.Errorf("wrong number of module calls in child_a %d; want %d", got, want)
}
}

func testSnapshotFSChownUnsupported(t *testing.T) {
err := snapshotFS{}.chown("test", 1,1)
if err == nil {
t.Fatal("expected Chown to return an error")
}
}