Manager: fix tests on Windows
Fix some tests that were failing because some parts of Flamenco now use native path separators instead of always-forward ones.
This commit is contained in:
parent
cbd8754595
commit
ab14c97b2e
@ -136,9 +136,10 @@ func TestReplaceJobsVariable(t *testing.T) {
|
|||||||
c.SharedStoragePath = storagePath
|
c.SharedStoragePath = storagePath
|
||||||
c.Shaman.Enabled = true
|
c.Shaman.Enabled = true
|
||||||
})
|
})
|
||||||
|
nativeCheckoutPath := crosspath.ToNative(conf.Shaman.CheckoutPath())
|
||||||
|
|
||||||
replacedTask := replaceTaskVariables(&conf, task, worker)
|
replacedTask := replaceTaskVariables(&conf, task, worker)
|
||||||
expectPath := crosspath.Join(crosspath.ToSlash(conf.Shaman.CheckoutPath()), "path/in/storage.blend")
|
expectPath := nativeCheckoutPath + "/path/in/storage.blend"
|
||||||
assert.Equal(t, expectPath, replacedTask.Commands[2].Parameters["filepath"])
|
assert.Equal(t, expectPath, replacedTask.Commands[2].Parameters["filepath"])
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -147,9 +148,10 @@ func TestReplaceJobsVariable(t *testing.T) {
|
|||||||
c.SharedStoragePath = storagePath
|
c.SharedStoragePath = storagePath
|
||||||
c.Shaman.Enabled = false
|
c.Shaman.Enabled = false
|
||||||
})
|
})
|
||||||
|
nativeJobsPath := crosspath.ToNative(crosspath.Join(storagePath, "jobs"))
|
||||||
|
|
||||||
replacedTask := replaceTaskVariables(&conf, task, worker)
|
replacedTask := replaceTaskVariables(&conf, task, worker)
|
||||||
expectPath := crosspath.Join(storagePath, "jobs", "path/in/storage.blend")
|
expectPath := nativeJobsPath + "/path/in/storage.blend"
|
||||||
assert.Equal(t, expectPath, replacedTask.Commands[2].Parameters["filepath"])
|
assert.Equal(t, expectPath, replacedTask.Commands[2].Parameters["filepath"])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -69,7 +69,7 @@ func TestStorageImplicitVariablesWithShaman(t *testing.T) {
|
|||||||
}
|
}
|
||||||
assert.False(t, c.implicitVariables["jobs"].IsTwoWay)
|
assert.False(t, c.implicitVariables["jobs"].IsTwoWay)
|
||||||
assert.Equal(t,
|
assert.Equal(t,
|
||||||
crosspath.ToSlash(c.Shaman.CheckoutPath()),
|
crosspath.ToNative(c.Shaman.CheckoutPath()),
|
||||||
c.implicitVariables["jobs"].Values[0].Value)
|
c.implicitVariables["jobs"].Values[0].Value)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -97,7 +97,7 @@ func TestStorageImplicitVariablesWithoutShaman(t *testing.T) {
|
|||||||
}
|
}
|
||||||
assert.False(t, c.implicitVariables["jobs"].IsTwoWay)
|
assert.False(t, c.implicitVariables["jobs"].IsTwoWay)
|
||||||
assert.Equal(t,
|
assert.Equal(t,
|
||||||
crosspath.ToSlash(c.SharedStoragePath),
|
crosspath.ToNative(c.SharedStoragePath),
|
||||||
c.implicitVariables["jobs"].Values[0].Value)
|
c.implicitVariables["jobs"].Values[0].Value)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user