Skip to content

Commit

Permalink
changes for block format (#345)
Browse files Browse the repository at this point in the history
  • Loading branch information
harshitsinghvi22 authored Aug 5, 2024
1 parent b1f574d commit 3cdf262
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions internal/integration_tests/standalone.go
Original file line number Diff line number Diff line change
Expand Up @@ -1155,15 +1155,15 @@ func introduceInconsistency(t *testing.T, releaseName model.ReleaseName) error {
}

// corrupting the database
// echo “” > /var/lib/neo4j/data/databases/neo4j/neostore.relationshipstore.db
// echo “” > /var/lib/neo4j/data/databases/neo4j/block.relationship.xd.db
cmd := []string{
"bash",
"-c",
"cp /var/lib/neo4j/data/databases/neo4j/neostore.relationshipstore.db /tmp/neostore.relationshipstore.db && echo '' > /var/lib/neo4j/data/databases/neo4j/neostore.relationshipstore.db",
"cp /var/lib/neo4j/data/databases/neo4j/block.relationship.xd.db /tmp/block.relationship.xd.db && echo '' > /var/lib/neo4j/data/databases/neo4j/block.relationship.xd.db",
}
stdout, stderr, err := ExecInPod(releaseName, cmd, "")
if err != nil {
return fmt.Errorf("error seen while executing command `echo \"\" > /var/lib/neo4j/data/databases/neo4j/neostore.relationshipstore.db' ,\n err :- %v", err)
return fmt.Errorf("error seen while executing command `echo \"\" > /var/lib/neo4j/data/databases/neo4j/block.relationship.xd.db' ,\n err :- %v", err)
}
if len(stderr) != 0 {
return fmt.Errorf("found something in stderr while introducing inconsistency %v\n", stderr)
Expand All @@ -1184,11 +1184,11 @@ func revertInconsistency(releaseName model.ReleaseName) error {
cmd := []string{
"bash",
"-c",
"mv /tmp/neostore.relationshipstore.db /var/lib/neo4j/data/databases/neo4j/neostore.relationshipstore.db",
"mv /tmp/block.relationship.xd.db /var/lib/neo4j/data/databases/neo4j/block.relationship.xd.db",
}
stdout, stderr, err := ExecInPod(releaseName, cmd, "")
if err != nil {
return fmt.Errorf("error seen while executing command `mv /tmp/neostore.relationshipstore.db /var/lib/neo4j/data/databases/neo4j/neostore.relationshipstore.db' ,\n err :- %v", err)
return fmt.Errorf("error seen while executing command `mv /tmp/block.relationship.xd.db /var/lib/neo4j/data/databases/neo4j/block.relationship.xd.db' ,\n err :- %v", err)
}
if strings.TrimSpace(stderr) != "" {
return fmt.Errorf("stderr is not empty while reverting inconsistency%v\n", stderr)
Expand Down

0 comments on commit 3cdf262

Please sign in to comment.