summaryrefslogtreecommitdiffstats
path: root/robot/resources/log_interface.robot
blob: aeb69b17ce7d1db7d55739c262c98213c67cba5f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
*** Settings ***
Documentation     Tests the health of the log containers: Elasticsearch, Logstash and Kibana.
Library    Collections
Library         String
Library         RequestsLibrary
Resource        global_properties.robot

*** Variables ***
${LOG_PATH}         /
${LOG_ELASTICSEARCH_ENDPOINT}    ${GLOBAL_LOG_SERVER_PROTOCOL}://${GLOBAL_INJECTED_LOG_ELASTICSEARCH_IP_ADDR}:${GLOBAL_LOG_ELASTICSEARCH_PORT}
${LOG_LOGSTASH_ENDPOINT}    ${GLOBAL_LOG_SERVER_PROTOCOL}://${GLOBAL_INJECTED_LOG_LOGSTASH_IP_ADDR}:${GLOBAL_LOG_LOGSTASH_PORT}
${LOG_KIBANA_ENDPOINT}    ${GLOBAL_LOG_SERVER_PROTOCOL}://${GLOBAL_INJECTED_LOG_KIBANA_IP_ADDR}:${GLOBAL_LOG_KIBANA_PORT}

*** Keywords ***
Run Log Elasticsearch Health Check
    [Documentation]   Tests Elasticsearch interface
    ${resp}=    Run Log Elasticsearch Get Request    ${LOG_PATH}
    Should Be Equal As Strings  ${resp.status_code}   200

Run Log Elasticsearch Get Request
    [Documentation]    Runs an Elasticsearch request
    [Arguments]    ${data_path}
    Log    Creating session ${LOG_ELASTICSEARCH_ENDPOINT}
    ${session}=    Create Session   log-elasticsearch   ${LOG_ELASTICSEARCH_ENDPOINT}
    ${resp}=  Get Request   log-elasticsearch   ${data_path}
    Log    Received response from log-elasticsearch ${resp.text}
    [Return]    ${resp}

Run Log Logstash Health Check
    [Documentation]   Tests Logstash interface
    ${resp}=    Run Log Logstash Get Request    ${LOG_PATH}
    Should Be Equal As Strings  ${resp.status_code}   200

Run Log Logstash Get Request
    [Documentation]    Runs a Logstash request
    [Arguments]    ${data_path}
    Log    Creating session ${LOG_LOGSTASH_ENDPOINT}
    ${session}=    Create Session   log-logstash  ${LOG_LOGSTASH_ENDPOINT}
    ${resp}=  Get Request   log-logstash  ${data_path}
    Log    Received response from log-logstash ${resp.text}
    [Return]    ${resp}

Run Log Kibana Health Check
    [Documentation]   Tests Kibana interface
    ${resp}=    Run Log Kibana Get Request    ${LOG_PATH}
    Should Be Equal As Strings  ${resp.status_code}   200

Run Log Kibana Get Request
    [Documentation]    Runs a Kibana request
    [Arguments]    ${data_path}
    Log    Creating session ${LOG_KIBANA_ENDPOINT}
    ${session}=    Create Session   log-kibana  ${LOG_KIBANA_ENDPOINT}
    ${resp}=  Get Request   log-kibana  ${data_path}
    Log    Received response from log-kibana ${resp.text}
    [Return]    ${resp}
t;/version> </parent> <properties> <sonar.skip>true</sonar.skip> </properties> <dependencies> <dependency> <groupId>com.google.guava</groupId> <artifactId>guava</artifactId> <version>${guava.version}</version> <scope>compile</scope> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>${junit.version}</version> <scope>compile</scope> </dependency> <dependency> <groupId>org.testng</groupId> <artifactId>testng</artifactId> <version>${testng.version}</version> <scope>compile</scope> </dependency> <dependency> <groupId>com.relevantcodes</groupId> <artifactId>extentreports</artifactId> <version>2.41.0</version> <scope>compile</scope> </dependency> <dependency> <groupId>org.mockito</groupId> <artifactId>mockito-core</artifactId> <version>${mockito.version}</version> <scope>compile</scope> </dependency> <dependency> <groupId>com.typesafe</groupId> <artifactId>config</artifactId> <version>1.0.2</version> <scope>compile</scope> </dependency> <dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> <version>1.2.17</version> <scope>compile</scope> </dependency> <dependency> <groupId>com.jcraft.jsch</groupId> <artifactId>com.springsource.com.jcraft.jsch</artifactId> <version>0.1.41</version> <scope>compile</scope> </dependency> <dependency> <groupId>org.openecomp.sdc</groupId> <artifactId>common-app-api</artifactId> <version>${project.version}</version> <scope>compile</scope> </dependency> <dependency> <groupId>org.openecomp.sdc.be</groupId> <artifactId>common-be</artifactId> <version>${project.version}</version> <scope>compile</scope> </dependency> <!-- CHECK CATLOG MODEL --> <dependency> <groupId>org.openecomp.sdc.be</groupId> <artifactId>catalog-model</artifactId> <version>${project.version}</version> <scope>compile</scope> </dependency> <!-- catalog dao --> <dependency> <groupId>org.openecomp.sdc.be</groupId> <artifactId>catalog-dao</artifactId> <version>${project.version}</version> <scope>compile</scope> </dependency> <!-- functional java --> <dependency> <groupId>org.functionaljava</groupId> <artifactId>functionaljava</artifactId> <version>${functionaljava.version}</version> <scope>compile</scope> </dependency> <!-- CASSANDRA --> <dependency> <groupId>com.datastax.cassandra</groupId> <artifactId>cassandra-driver-core</artifactId> <version>${cassandra.driver.version}</version> <scope>compile</scope> </dependency> <!-- CASSANDRA END --> <!-- slf4j + logback --> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> <version>${slf4j-api.version}</version> <scope>compile</scope> </dependency> <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-classic</artifactId> <version>${logback.version}</version> <scope>compile</scope> </dependency> <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-core</artifactId> <version>${logback.version}</version> <scope>compile</scope> </dependency> <dependency> <groupId>com.googlecode.json-simple</groupId> <artifactId>json-simple</artifactId> <version>${json-simple.version}</version> <scope>compile</scope> </dependency> <!-- File changes listener --> <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-jci-core</artifactId> <version>${commons-jci-core.version}</version> <scope>compile</scope> </dependency> <dependency> <groupId>commons-codec</groupId> <artifactId>commons-codec</artifactId> <version>${commons-codec}</version> <scope>compile</scope> </dependency> <!-- Gson --> <dependency> <groupId>com.google.code.gson</groupId> <artifactId>gson</artifactId> <version>${gson.version}</version> <scope>compile</scope> </dependency> <!-- Snake Yaml --> <dependency> <groupId>org.yaml</groupId> <artifactId>snakeyaml</artifactId> <version>${snakeyaml.version}</version> <scope>compile</scope> </dependency> <!-- http client --> <dependency> <groupId>org.apache.httpcomponents</groupId> <artifactId>httpclient</artifactId> <version>${httpclient.version}</version> <scope>compile</scope> </dependency> <dependency> <groupId>org.apache.httpcomponents</groupId> <artifactId>httpmime</artifactId> <version>${httpclient.version}</version> <scope>compile</scope> </dependency> <dependency> <groupId>commons-io</groupId> <artifactId>commons-io</artifactId> <version>2.5</version> <scope>compile</scope> </dependency> <dependency> <groupId>commons-logging</groupId> <artifactId>commons-logging</artifactId> <version>${commons-logging}</version> <scope>compile</scope> </dependency> <!-- http core --> <dependency> <groupId>org.apache.httpcomponents</groupId> <artifactId>httpcore</artifactId> <version>${httpcore.version}</version> <scope>compile</scope> </dependency> <!-- TITAN --> <dependency> <groupId>com.thinkaurelius.titan</groupId> <artifactId>titan-core</artifactId> <version>${titan.version}</version> <scope>compile</scope> <exclusions> <exclusion> <artifactId>slf4j-log4j12</artifactId> <groupId>org.slf4j</groupId> </exclusion> </exclusions> </dependency> <dependency> <groupId>org.openecomp.sdc.sdc-titan-cassandra</groupId> <artifactId>sdc-titan-cassandra</artifactId> <version>${titan.version}</version> <scope>compile</scope> <exclusions> <exclusion> <artifactId>slf4j-log4j12</artifactId> <groupId>org.slf4j</groupId> </exclusion> </exclusions> </dependency> <dependency> <groupId>org.codehaus.jackson</groupId> <artifactId>jackson-mapper-asl</artifactId> <version>1.9.2</version> <scope>compile</scope> </dependency> <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-databind</artifactId> <version>${jackson.version}</version> <!--<version>2.3.1</version>--> <scope>compile</scope> </dependency> <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-core</artifactId> <version>${jackson.version}</version> <!--<version>2.3.1</version>--> <scope>compile</scope> </dependency> <dependency> <groupId>org.openecomp.sdc.sdc-distribution-client</groupId> <artifactId>sdc-distribution-client</artifactId> <version>1.1.32</version> <scope>compile</scope> </dependency> <dependency> <groupId>org.openecomp.ecompsdkos</groupId> <artifactId>epsdk-fw</artifactId> <version>${ecomp.version}</version> <scope>compile</scope> <exclusions> <exclusion> <artifactId>slf4j-log4j12</artifactId> <groupId>org.slf4j</groupId> </exclusion> </exclusions> </dependency> <dependency> <groupId>org.json</groupId> <artifactId>json</artifactId> <version>20090211</version> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-deploy-plugin</artifactId> <version>2.7</version> <configuration> <skip>true</skip> </configuration> </plugin> <!-- ============================================= --> <!-- Create the JAR file with its dependencies --> <!-- ============================================= --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-assembly-plugin</artifactId> <executions> <execution> <id>create.jar.with.dependencies</id> <phase>package</phase> <goals> <goal>single</goal> </goals> <configuration> <archive> <manifest> <mainClass>org.openecomp.sdc.ci.tests.run.StartTest</mainClass> </manifest> </archive> <descriptorRefs> <descriptorRef>jar-with-dependencies</descriptorRef> </descriptorRefs> </configuration> </execution> </executions> </plugin> </plugins> </build> </project>