Skip to content

Commit

Permalink
More tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hknutzen committed Sep 17, 2021
1 parent d8abad8 commit a0e1a1f
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 1 deletion.
11 changes: 11 additions & 0 deletions go/testdata/format-netspoc/format-netspoc.t
Original file line number Diff line number Diff line change
Expand Up @@ -1302,3 +1302,14 @@ xxx
=WARNING=NONE
############################################################
=TITLE=Can't change readonly file
=INPUT=
--f1
group:g1=;
=SETUP=
chmod u-w netspoc/f1
=ERROR=
Error: Can't open f1: permission denied
=END=
############################################################
19 changes: 18 additions & 1 deletion go/testdata/options.t
Original file line number Diff line number Diff line change
Expand Up @@ -160,14 +160,31 @@ Aborted
=TITLE=Can't create out directory
=SETUP=touch out
=INPUT=
-- topology
network:n1 = { ip = 10.1.1.0/24; }
=WITH_OUTDIR=
=ERROR=
Error: Can't mkdir out: file exists
Aborted
=END=
############################################################
=TITLE=Can't write to out directory
=SETUP=
mkdir out
chmod u-w out
=INPUT=
network:n1 = { ip = 10.1.1.0/24; }
router:r1 = {
managed;
model = ASA;
interface:n1 = { ip = 10.1.1.1; hardware = n1; }
}
=WITH_OUTDIR=
=ERROR=
Error: Can't open out/r1.config: permission denied
Aborted
=END=
############################################################
=TITLE=Can't write code file
=SETUP=
Expand Down
14 changes: 14 additions & 0 deletions go/testdata/reuse-previous.t
Original file line number Diff line number Diff line change
Expand Up @@ -130,3 +130,17 @@ Aborted
=END=
############################################################
=TITLE=.prev is file
=SETUP=
mkdir out/
touch out/.prev
chmod u-w out/.prev
chmod u-x out
=INPUT=
-- topology
network:n1 = { ip = 10.1.1.0/24; }
=WITH_OUTDIR=
=ERROR=
Error: Can't mkdir out/.prev: permission denied
Aborted
=END=

0 comments on commit a0e1a1f

Please sign in to comment.