Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
jakedoublev committed Dec 3, 2024
1 parent 94c9bed commit 1a52d7b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions e2e/subject-mapping.bats
Original file line number Diff line number Diff line change
Expand Up @@ -98,17 +98,15 @@ teardown_file() {
run_otdfctl_sm get --id "$created"
assert_success
assert_output --regexp "Id.*$created"
assert_output --regexp "Attribute Value Id.*$VAL2_ID"
assert_output --partial "Attribute Value FQN"
assert_output --partial "https://subject-mappings.net/attr/attr1/value/value2"
assert_output --regexp "Attribute Value: Id.*$VAL2_ID"
assert_output --regexp "Attribute Value: Value.*value2"
assert_output --regexp "Subject Condition Set: Id.*$created"

# json
run_otdfctl_sm get --id "$created" --json
assert_success
[ "$(echo $output | jq -r '.id')" = "$created" ]
[ "$(echo $output | jq -r '.attribute_value.id')" = "$VAL2_ID" ]
[ "$(echo $output | jq -r '.attribute_value.fqn')" = "https://subject-mappings.net/attr/attr1/value/value2" ]
[ "$(echo $output | jq -r '.subject_condition_set.id')" = "$new_scs" ]
}

Expand All @@ -135,6 +133,8 @@ teardown_file() {
run_otdfctl_sm list
assert_success
assert_output --partial "$created"
assert_output --regexp "FQN.*https://subject-mappings.net/attr/attr1/value/val1"
# TODO: test the specific FQN in table and in JSON
}

@test "Delete subject mapping" {
Expand Down

0 comments on commit 1a52d7b

Please sign in to comment.