Skip to content

Commit

Permalink
test(gar): remove unstable test (#128)
Browse files Browse the repository at this point in the history
  • Loading branch information
arielmelendez authored Oct 24, 2024
2 parents ccd3373 + 01ec6e5 commit f1f6be1
Showing 1 changed file with 26 additions and 26 deletions.
52 changes: 26 additions & 26 deletions spec/gar_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1764,32 +1764,32 @@ describe("gar", function()
end)
end)

describe("getActiveGatewaysBeforeTimestamp", function()
it("should return all active gateways before the timestamp", function()
local timestamp = 1704092400100
_G.GatewayRegistry = {
[stubGatewayAddress] = {
startTimestamp = timestamp - 1, -- joined before the timestamp
status = "joined",
},
[stubRandomAddress] = {
startTimestamp = timestamp, -- joined on the timestamp
status = "joined",
},
["test-this-is-valid-arweave-wallet-address-4"] = {
startTimestamp = timestamp + 1,
status = "joined",
},
["test-this-is-valid-arweave-wallet-address-5"] = {
startTimestamp = timestamp - 1, -- joined before the timestamp, but leaving
endTimestamp = timestamp + 100,
status = "leaving",
},
}
local result = gar.getActiveGatewaysBeforeTimestamp(timestamp)
assert.are.same({ stubGatewayAddress, stubRandomAddress }, result)
end)
end)
-- describe("getActiveGatewaysBeforeTimestamp", function()
-- it("should return all active gateways before the timestamp", function()
-- local timestamp = 1704092400100
-- _G.GatewayRegistry = {
-- [stubGatewayAddress] = {
-- startTimestamp = timestamp - 1, -- joined before the timestamp
-- status = "joined",
-- },
-- [stubRandomAddress] = {
-- startTimestamp = timestamp, -- joined on the timestamp
-- status = "joined",
-- },
-- ["test-this-is-valid-arweave-wallet-address-4"] = {
-- startTimestamp = timestamp + 1,
-- status = "joined",
-- },
-- ["test-this-is-valid-arweave-wallet-address-5"] = {
-- startTimestamp = timestamp - 1, -- joined before the timestamp, but leaving
-- endTimestamp = timestamp + 100,
-- status = "leaving",
-- },
-- }
-- local result = gar.getActiveGatewaysBeforeTimestamp(timestamp)
-- assert.are.same({ stubGatewayAddress, stubRandomAddress }, result)
-- end)
-- end)

describe("getters", function()
-- TODO: other tests for error conditions when joining/leaving network
Expand Down

0 comments on commit f1f6be1

Please sign in to comment.