aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2012-10-04 01:22:27 +0300
committerSergey Poznyakoff <gray@gnu.org.ua>2012-10-04 01:22:27 +0300
commit11db69e6d2b292df96845515f7df0e850b60c125 (patch)
tree9c4bb3a47ead03b6093ceed3e0142fc259a91de0 /tests
parent256d8b3572532af87ea5b28379cee709ad44cea6 (diff)
downloadeclat-11db69e6d2b292df96845515f7df0e850b60c125.tar.gz
eclat-11db69e6d2b292df96845515f7df0e850b60c125.tar.bz2
Implement eq/ne comparisons in forlan; Implement describe-security-groups command.
* etc/Makefile.am: Add new file. * etc/describe-security-groups.fln: New file. * lib/forlan.c: Implement equality and inequality comparisons. * lib/forlan.h (forlan_opcode_eq) (forlan_opcode_ne): New opcodes. (FORLAN_NTYPES): New constants. * lib/forlangrm.y: Add equality and inequality productions. * lib/forlanlex.l: New tokens: == and != * src/dscrsecgrps-cl.opt: New file. * src/dscrsecgrps.c: New file. * src/Makefile.am: Add new files. * src/eclat.c: Implement describe-security-groups * src/eclat.h (eclat_describe_security_groups): New proto. * src/cretags.c: Fix memory leaks. * src/deltags.c: Likewise. * src/dscrtags.c: Likewise. * tests/describe-security-groups.at: New test case. * tests/testsuite.at: Include new test case. * tests/Makefile.am: Add new test case.
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile.am1
-rw-r--r--tests/describe-security-groups.at82
-rw-r--r--tests/testsuite.at1
3 files changed, 84 insertions, 0 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index c03730f..abe8f98 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -46,6 +46,7 @@ TESTSUITE_AT = \
describe-instance-attribute.at\
describe-instance-status.at\
describe-instances.at\
+ describe-security-groups.at\
describe-tags.at\
describe-volumes.at\
dump01.at\
diff --git a/tests/describe-security-groups.at b/tests/describe-security-groups.at
new file mode 100644
index 0000000..4b424d8
--- /dev/null
+++ b/tests/describe-security-groups.at
@@ -0,0 +1,82 @@
+# This file is part of Eclat -*- Autotest -*-
+# Copyright (C) 2012 Sergey Poznyakoff
+#
+# Eclat is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# Eclat is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Eclat. If not, see <http://www.gnu.org/licenses/>.
+
+ECLAT_TEST_FORMAT([DescribeSecurityGroups],
+[DescribeSecurityGroups],
+[describe-security-groups.fln],
+[<DescribeSecurityGroupsResponse xmlns="http://ec2.amazonaws.com/doc/2012-08-15/">
+ <requestId>59dbff89-35bd-4eac-99ed-be587EXAMPLE</requestId>
+ <securityGroupInfo>
+ <item>
+ <ownerId>111122223333</ownerId>
+ <groupId>sg-443d0a12</groupId>
+ <groupName>WebServers</groupName>
+ <groupDescription>Web Servers</groupDescription>
+ <vpcId/>
+ <ipPermissions>
+ <item>
+ <ipProtocol>tcp</ipProtocol>
+ <fromPort>80</fromPort>
+ <toPort>80</toPort>
+ <groups/>
+ <ipRanges>
+ <item>
+ <cidrIp>0.0.0.0/0</cidrIp>
+ </item>
+ </ipRanges>
+ </item>
+ </ipPermissions>
+ <ipPermissionsEgress/>
+ <tagSet/>
+ </item>
+ <item>
+ <ownerId>111122223333</ownerId>
+ <groupId>sg-5ff8a023</groupId>
+ <groupName>RangedPortsBySource</groupName>
+ <groupDescription>Group A</groupDescription>
+ <ipPermissions>
+ <item>
+ <ipProtocol>tcp</ipProtocol>
+ <fromPort>6000</fromPort>
+ <toPort>7000</toPort>
+ <groups>
+ <item>
+ <userId>111122223333</userId>
+ <groupId>sg-99gh4012</groupId>
+ <groupName>Group B</groupName>
+ </item>
+ </groups>
+ <ipRanges/>
+ </item>
+ </ipPermissions>
+ <ipPermissionsEgress/>
+ <tagSet/>
+ </item>
+ </securityGroupInfo>
+</DescribeSecurityGroupsResponse>
+],
+[Group sg-443d0a12 WebServers "Web Servers"
+VPC ID:
+Incoming:
+tcp 0.0.0.0/0 80
+Outgoing:
+Group sg-5ff8a023 RangedPortsBySource "Group A"
+VPC ID:
+Incoming:
+user 111122223333, group sg-99gh4012 ("Group B") 6000-7000
+Outgoing:
+])
+
diff --git a/tests/testsuite.at b/tests/testsuite.at
index b47591f..c740e1f 100644
--- a/tests/testsuite.at
+++ b/tests/testsuite.at
@@ -60,6 +60,7 @@ m4_include([describe-addresses.at])
m4_include([describe-instance-attribute.at])
m4_include([describe-instance-status.at])
m4_include([describe-instances.at])
+m4_include([describe-security-groups.at])
m4_include([describe-tags.at])
m4_include([describe-volumes.at])
m4_include([get-console-output.at])

Return to:

Send suggestions and report system problems to the System administrator.