Skip to content

Commit 22a11a7

Browse files
authored
test(glacier): fix broken cucumber test (#1885)
1 parent d4c302b commit 22a11a7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

features/glacier/step_definitions/glacier.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ Given(
2323
vaultName: this.vaultName,
2424
body: data,
2525
};
26+
// Computed by running bodyChecksumGenerator from body-checksum-node
27+
this.treeHash = "6faefade5a638cd3545d638dd5754763658e32209e69420cb559b7650d4bf93a";
2628
if (invalid) {
2729
if (invalid.match("invalid")) params.checksum = "000";
2830
else params.checksum = "00000000000000000000000000000000";
@@ -37,8 +39,7 @@ Then("the result should contain the Glacier archive ID", function (callback) {
3739
});
3840

3941
Then("the result should contain the same tree hash checksum", function (callback) {
40-
const hash = this.data.$metadata.httpHeaders["x-amz-sha256-tree-hash"];
41-
this.assert.equal(this.data.checksum, hash);
42+
this.assert.equal(this.data.checksum, this.treeHash);
4243
callback();
4344
});
4445

0 commit comments

Comments
 (0)