wip snapshot after account logout; squash into the unit commit
check / check (push) Canceled after 0s
check / check (push) Canceled after 0s
Model: fable-5-1
This commit is contained in:
@@ -1347,20 +1347,22 @@ func TestGenerateDefaultOutput(t *testing.T) {
|
||||
func TestGenerateSeveralPathsDefaultOutput(t *testing.T) {
|
||||
root := t.TempDir()
|
||||
fs := afero.NewOsFs()
|
||||
require.NoError(t, fs.MkdirAll(filepath.Join(root, "first"), 0o750))
|
||||
require.NoError(t, fs.MkdirAll(filepath.Join(root, "second"), 0o750))
|
||||
writeTestFile(t, fs, filepath.Join(root, "first", "one.txt"), "1")
|
||||
writeTestFile(t, fs, filepath.Join(root, "second", "two.txt"), "2")
|
||||
dirs := []string{"first", "second"}
|
||||
|
||||
for _, dir := range dirs {
|
||||
require.NoError(t, fs.MkdirAll(filepath.Join(root, dir), 0o750))
|
||||
writeTestFile(t, fs, filepath.Join(root, dir, dir+".txt"), dir)
|
||||
}
|
||||
|
||||
t.Chdir(root)
|
||||
|
||||
opts := testOpts([]string{testApp, cmdGenerate, "-q", "first", "second"}, fs)
|
||||
opts := testOpts(append([]string{testApp, cmdGenerate, "-q"}, dirs...), fs)
|
||||
require.Equal(t, 0, runCLI(opts), "stderr: %s", testStderr(t, opts))
|
||||
|
||||
assert.ElementsMatch(t, []string{"one.txt", "two.txt"},
|
||||
assert.ElementsMatch(t, []string{"first.txt", "second.txt"},
|
||||
manifestPaths(t, fs, filepath.Join(root, defaultManifestName)))
|
||||
|
||||
for _, dir := range []string{"first", "second"} {
|
||||
for _, dir := range dirs {
|
||||
exists, err := afero.Exists(fs, filepath.Join(root, dir, defaultManifestName))
|
||||
require.NoError(t, err)
|
||||
assert.False(t, exists, "index.mf written in %s", dir)
|
||||
|
||||
Reference in New Issue
Block a user