mirror of
https://github.com/project-zot/zot.git
synced 2026-06-15 20:07:55 +08:00
Fix data races in tests, closes #255
Signed-off-by: Alexei Dodon <adodon@cisco.com>
This commit is contained in:
committed by
Ramkumar Chinchani
parent
4d50ad2bb1
commit
e900b09cfb
@@ -475,6 +475,15 @@ func TestStorageAPIs(t *testing.T) {
|
||||
indexContent, err := il.GetIndexContent("test")
|
||||
So(err, ShouldBeNil)
|
||||
|
||||
if testcase.storageType == "fs" {
|
||||
err = os.Chmod(path.Join(il.RootDir(), "test", "index.json"), 0000)
|
||||
So(err, ShouldBeNil)
|
||||
_, err = il.GetIndexContent("test")
|
||||
So(err, ShouldNotBeNil)
|
||||
err = os.Chmod(path.Join(il.RootDir(), "test", "index.json"), 0644)
|
||||
So(err, ShouldBeNil)
|
||||
}
|
||||
|
||||
var index ispec.Index
|
||||
|
||||
err = json.Unmarshal(indexContent, &index)
|
||||
|
||||
Reference in New Issue
Block a user