Skip to content

Commit

Permalink
change rule to ignore unknown
Browse files Browse the repository at this point in the history
  • Loading branch information
albertolerda committed Nov 6, 2023
1 parent a1dab1c commit 4819cb9
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 43 deletions.
2 changes: 1 addition & 1 deletion pkg/browser/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ <h1>Test http</h1>
<div id="test1"></div>
<script>
const script = `
Rule caller restroom-mw
Rule unknown ignore
Given I connect to 'did_url' and do get and output into 'did'
Given I have a 'string dictionary' named 'did'
Given I have a 'string' named 'foo'
Expand Down
2 changes: 1 addition & 1 deletion pkg/core/test/slangroom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ test('runs all unknown statements', async (t) => {
};

const script = `
Rule caller restroom-mw
Rule unknown ignore
Given I A and output into 'a'
Given I have a 'string' named 'a'
Expand Down
6 changes: 3 additions & 3 deletions pkg/ethereum/test/e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { ethereum } from '@slangroom/ethereum';

test('Retrieve a zenroom object', async (t) => {
const script = `
Rule caller restroom-mw
Rule unknown ignore
Scenario ethereum
Given I connect to 'fabchain' and send transaction_id 'my_tag' and read the ethereum bytes and output into 'poem_bytes'
Given I have a 'hex' named 'poem bytes'
Expand Down Expand Up @@ -33,7 +33,7 @@ Then print data

test('Store an object on eth', async (t) => {
const script = `
Rule caller restroom-mw
Rule unknown ignore
Scenario ethereum
Given I connect to 'fabchain' and send address 'my_address' and read the ethereum nonce and output into 'ethereum_nonce'
Given I have the 'keyring'
Expand Down Expand Up @@ -73,7 +73,7 @@ Then I connect to 'fabchain' and send transaction 'signed_ethereum_transaction'

test('Make slangroom fail', async (t) => {
const script = `
Rule caller restroom-mw
Rule unknown ignore
Scenario ethereum
Given I connect to 'fabchain' and send address 'my_address' and read the ethereum and output into 'ethereum_nonce'
Given nothing
Expand Down
4 changes: 2 additions & 2 deletions pkg/http/test/e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ nock('http://localhost')

test('Full script that uses http plugin', async (t) => {
const script = `
Rule caller restroom-mw
Rule unknown ignore
Given I connect to 'greeting_es' and do get and output into 'es'
Given I connect to 'greeting_en' and do get and output into 'en'
Expand Down Expand Up @@ -62,7 +62,7 @@ Then I connect to 'final_endpoints' and send object 'string_array' and do parall

test('Send auth header', async (t) => {
const script = `
Rule caller restroom-mw
Rule unknown ignore
Given I connect to 'auth_url' and send headers 'headers' and do get and output into 'auth'
Given I have a 'string dictionary' named 'auth'
Expand Down
35 changes: 0 additions & 35 deletions pkg/ignored/src/tokens.ts

This file was deleted.

2 changes: 1 addition & 1 deletion pkg/ignored/test/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Then print the data

test("zenroom doesn't ignore ecdh but ignores restroom statements", async (t) => {
// Given I have a contract with ecdh and restroom statements
const contract = `# Always use 'Rule caller restroom-mw' when using Restroom
const contract = `# Always use 'Rule unknown ignore' when using Restroom
Rule unknown ignore
# we'll need to create a keyring to produce an ECDSA signature later
Scenario 'ecdh': Create the keyring
Expand Down

0 comments on commit 4819cb9

Please sign in to comment.