(t *testing.T)
| 245 | } |
| 246 | |
| 247 | func TestSandboxFilePath(t *testing.T) { |
| 248 | root := t.TempDir() |
| 249 | |
| 250 | path, err := sandboxFilePath(root, root, "keys/deploy.pub") |
| 251 | require.NoError(t, err) |
| 252 | assert.Equal(t, filepath.Join(root, "keys/deploy.pub"), path) |
| 253 | |
| 254 | _, err = sandboxFilePath(root, root, filepath.Join(root, "deploy.pub")) |
| 255 | assert.EqualError(t, err, "path must be relative to the testscript sandbox") |
| 256 | |
| 257 | _, err = sandboxFilePath(root, root, "../deploy.pub") |
| 258 | assert.EqualError(t, err, "path must stay within the testscript sandbox") |
| 259 | } |
| 260 | |
| 261 | func TestRepositoryCreationIsManaged(t *testing.T) { |
| 262 | assert.True(t, repositoryCreationIsManaged([]string{"repo", "create", "example"}, "shared")) |
nothing calls this directly
no test coverage detected