Skip to content

Commit

Permalink
Merge pull request #21 from m-Peter/add-bridge-tests
Browse files Browse the repository at this point in the history
Fix testing aliases in flow.json config file and update tests
  • Loading branch information
sisyphusSmiling authored Mar 20, 2024
2 parents cd204d3 + 943d935 commit 930e741
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 130 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cadence_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
restore-keys: |
${{ runner.os }}-go-
- name: Install Flow CLI
run: sh -ci "$(curl -fsSL https://raw.githubusercontent.com/onflow/flow-cli/master/install.sh)" -- v1.12.0-cadence-v1.0.0-M8-2
run: sh -ci "$(curl -fsSL https://raw.githubusercontent.com/onflow/flow-cli/master/install.sh)" -- v1.15.0-cadence-v1.0.0-preview.12
- name: Flow CLI Version
run: flow version
- name: Update PATH
Expand Down
71 changes: 13 additions & 58 deletions cadence/tests/flow_evm_bridge_tests.cdc

Large diffs are not rendered by default.

37 changes: 2 additions & 35 deletions cadence/tests/serialize_nft_tests.cdc
Original file line number Diff line number Diff line change
Expand Up @@ -14,52 +14,19 @@ access(all) var mintedBlockHeight: UInt64 = 0
access(all)
fun setup() {
var err = Test.deployContract(
name: "ViewResolver",
path: "../contracts/standards/ViewResolver.cdc",
arguments: []
)
Test.expect(err, Test.beNil())
err = Test.deployContract(
name: "Burner",
path: "../contracts/standards/Burner.cdc",
arguments: []
)
err = Test.deployContract(
name: "FungibleToken",
path: "../contracts/standards/FungibleToken.cdc",
arguments: []
)
Test.expect(err, Test.beNil())
err = Test.deployContract(
name: "NonFungibleToken",
path: "../contracts/standards/NonFungibleToken.cdc",
arguments: []
)
Test.expect(err, Test.beNil())
err = Test.deployContract(
name: "MetadataViews",
path: "../contracts/standards/MetadataViews.cdc",
arguments: []
)
Test.expect(err, Test.beNil())
err = Test.deployContract(
name: "FungibleTokenMetadataViews",
path: "../contracts/standards/FungibleTokenMetadataViews.cdc",
arguments: []
)
Test.expect(err, Test.beNil())
err = Test.deployContract(
name: "ExampleNFT",
path: "../contracts/example-assets/ExampleNFT.cdc",
arguments: []
)
Test.expect(err, Test.beNil())

err = Test.deployContract(
name: "Serialize",
path: "../contracts/utils/Serialize.cdc",
arguments: []
)
Test.expect(err, Test.beNil())

err = Test.deployContract(
name: "SerializeNFT",
path: "../contracts/utils/SerializeNFT.cdc",
Expand Down
29 changes: 0 additions & 29 deletions cadence/tests/serialize_tests.cdc
Original file line number Diff line number Diff line change
Expand Up @@ -11,35 +11,6 @@ let alice = Test.createAccount()
access(all)
fun setup() {
var err = Test.deployContract(
name: "ViewResolver",
path: "../contracts/standards/ViewResolver.cdc",
arguments: []
)
Test.expect(err, Test.beNil())
err = Test.deployContract(
name: "Burner",
path: "../contracts/standards/Burner.cdc",
arguments: []
)
err = Test.deployContract(
name: "FungibleToken",
path: "../contracts/standards/FungibleToken.cdc",
arguments: []
)
Test.expect(err, Test.beNil())
err = Test.deployContract(
name: "NonFungibleToken",
path: "../contracts/standards/NonFungibleToken.cdc",
arguments: []
)
Test.expect(err, Test.beNil())
err = Test.deployContract(
name: "MetadataViews",
path: "../contracts/standards/MetadataViews.cdc",
arguments: []
)
Test.expect(err, Test.beNil())
err = Test.deployContract(
name: "Serialize",
path: "../contracts/utils/Serialize.cdc",
arguments: []
Expand Down
8 changes: 1 addition & 7 deletions flow.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
"source": "./cadence/contracts/standards/Burner.cdc",
"aliases": {
"emulator": "ee82856bf20e2aa6",
"previewnet": "b6763b4399a888c8",
"testing": "0000000000000007"
"previewnet": "b6763b4399a888c8"
}
},
"CrossVMNFT": {
Expand Down Expand Up @@ -91,7 +90,6 @@
"emulator": "ee82856bf20e2aa6",
"mainnet": "f233dcee88fe0abe",
"previewnet": "a0225e7000ac82a9",
"testing": "0000000000000007",
"testnet": "9a0766d93b6608b7"
}
},
Expand All @@ -101,7 +99,6 @@
"emulator": "f8d6e0586b0a20c7",
"mainnet": "f233dcee88fe0abe",
"previewnet": "a0225e7000ac82a9",
"testing": "0000000000000007",
"testnet": "9a0766d93b6608b7"
}
},
Expand Down Expand Up @@ -129,7 +126,6 @@
"emulator": "f8d6e0586b0a20c7",
"mainnet": "1d7e57aa55817448",
"previewnet": "b6763b4399a888c8",
"testing": "0000000000000007",
"testnet": "631e88ae7f1d7c20"
}
},
Expand All @@ -139,7 +135,6 @@
"emulator": "f8d6e0586b0a20c7",
"mainnet": "1d7e57aa55817448",
"previewnet": "b6763b4399a888c8",
"testing": "0000000000000007",
"testnet": "631e88ae7f1d7c20"
}
},
Expand Down Expand Up @@ -175,7 +170,6 @@
"emulator": "f8d6e0586b0a20c7",
"mainnet": "1d7e57aa55817448",
"previewnet": "b6763b4399a888c8",
"testing": "0000000000000007",
"testnet": "631e88ae7f1d7c20"
}
}
Expand Down

0 comments on commit 930e741

Please sign in to comment.