Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
50 changes: 50 additions & 0 deletions test/test/structure_1_33_00/test_base.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
from test.src.format_dockerc_stdout import format_dockerc_stdout
from test.src.TestDirContext import TestDirContext

def test_base(file = __file__):
with TestDirContext(file) as ctx:
dockerc = ctx.run_dockerc(
'base',
)
dockerc.assert_context_ok(
format_dockerc_stdout(
b'docker compose'
b' -f ./docker-compose-base.yml'
b' up -d'
),
)

def test_base_override(file = __file__):
with TestDirContext(file) as ctx:
dockerc = ctx.run_dockerc(
'base.override',
)
dockerc.assert_context_ok(
format_dockerc_stdout(
b'docker compose'
b' -f ./docker-compose-base.yml'
b' -f ./docker-compose-base.override.yml'
b' up -d'
),
)

def test_base_dev(file = __file__):
with TestDirContext(file) as ctx:
dockerc = ctx.run_dockerc(
'base.dev',
)
dockerc.assert_context_not_found()

def test_base_prod_not_found(file = __file__):
with TestDirContext(file) as ctx:
dockerc = ctx.run_dockerc(
'base.prod',
)
dockerc.assert_context_not_found()

def test_base_what_not_found(file = __file__):
with TestDirContext(file) as ctx:
dockerc = ctx.run_dockerc(
'base.what',
)
dockerc.assert_context_not_found()
62 changes: 62 additions & 0 deletions test/test/structure_1_33_00/test_standard.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
from test.src.format_dockerc_stdout import format_dockerc_stdout
from test.src.TestDirContext import TestDirContext

def test_default(file = __file__):
with TestDirContext(file) as ctx:
dockerc = ctx.run_dockerc()
dockerc.assert_context_ok(
format_dockerc_stdout(
b'docker compose'
b' -f ./docker-compose.yml'
b' -f ./docker-compose.override.yml'
b' up -d'
),
)

def test_override_not_found(file = __file__):
with TestDirContext(file) as ctx:
dockerc = ctx.run_dockerc(
'override',
)
dockerc.assert_context_ok(
format_dockerc_stdout(
b'docker compose'
b' -f ./docker-compose.yml'
b' -f ./docker-compose.override.yml'
b' up -d'
),
)

def test_dev_not_found(file = __file__):
with TestDirContext(file) as ctx:
dockerc = ctx.run_dockerc(
'dev',
)
dockerc.assert_context_ok(
format_dockerc_stdout(
b'docker compose'
b' -f ./docker-compose.yml'
b' -f ./docker-compose.dev.yml'
b' up -d'
),
)

def test_prod_not_found(file = __file__):
with TestDirContext(file) as ctx:
dockerc = ctx.run_dockerc(
'prod',
)
dockerc.assert_context_ok(
format_dockerc_stdout(
b'docker compose'
b' -f ./docker-compose.yml'
b' up -d'
),
)

def test_what_not_found(file = __file__):
with TestDirContext(file) as ctx:
dockerc = ctx.run_dockerc(
'what',
)
dockerc.assert_context_not_found()