Skip to content

Commit 1f334b0

Browse files
Simplify test logic to mirror action.yml validation pattern
Co-authored-by: joshjohanning <19912012+joshjohanning@users.noreply.github.com>
1 parent 79ff148 commit 1f334b0

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

__tests__/action.test.sh

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -279,17 +279,8 @@ test_azdo_config_validation() {
279279
# Test when both org and PAT are set (valid)
280280
ORG="my-org"
281281
PAT="my-pat-token"
282-
ORG_CHECK_FAILED=false
283-
PAT_CHECK_FAILED=false
284282

285-
if [ -z "$ORG" ]; then
286-
ORG_CHECK_FAILED=true
287-
fi
288-
if [ -z "$PAT" ]; then
289-
PAT_CHECK_FAILED=true
290-
fi
291-
292-
if [ "$ORG_CHECK_FAILED" = false ] && [ "$PAT_CHECK_FAILED" = false ]; then
283+
if [ -n "$ORG" ] && [ -n "$PAT" ]; then
293284
TESTS_RUN=$((TESTS_RUN + 1))
294285
TESTS_PASSED=$((TESTS_PASSED + 1))
295286
echo -e "${GREEN}${NC} Should pass when both org and PAT are set"

0 commit comments

Comments
 (0)