Skip to content

Commit

Permalink
Merge pull request #399 from opencybersecurityalliance/test_without_i…
Browse files Browse the repository at this point in the history
…nstall

Change test_stixshifter_diagnosis to use bin dir instead of system PATH
  • Loading branch information
pcoccoli authored Sep 12, 2023
2 parents 07adff1 + 5673b04 commit c4e4749
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Empty file modified bin/stix-shifter-diag
100644 → 100755
Empty file.
11 changes: 8 additions & 3 deletions tests/test_stixshifter_diagnosis.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
import pytest
import os
import subprocess
import pytest

from kestrel_datasource_stixshifter.diagnosis import Diagnosis
from .utils import stixshifter_profile_lab101, stixshifter_profile_ecs


cwd = os.path.dirname(os.path.abspath(__file__))
STIX_SHIFTER_DIAG = os.path.join(cwd, "../bin/stix-shifter-diag")


def test_diagnosis(stixshifter_profile_lab101):
pattern = " ".join(
[
Expand Down Expand Up @@ -74,7 +79,7 @@ def test_cli(stixshifter_profile_lab101):
"""

result = subprocess.run(
args=["stix-shifter-diag", "lab101"],
args=[STIX_SHIFTER_DIAG, "lab101"],
universal_newlines=True,
stdout=subprocess.PIPE,
)
Expand Down Expand Up @@ -128,7 +133,7 @@ def test_cli_ecs(stixshifter_profile_ecs):

result = subprocess.run(
args=[
"stix-shifter-diag",
STIX_SHIFTER_DIAG,
"-p",
"[x-oca-asset:device_id = '123456'] START t'2000-01-01T00:00:00.000Z' STOP t'3000-01-01T00:00:00.000Z'",
"-t",
Expand Down

0 comments on commit c4e4749

Please sign in to comment.