-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #80 from RedPillAnalytics/develop
Basic Authentication
- Loading branch information
Showing
3 changed files
with
68 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
import com.redpillanalytics.KsqlRest | ||
import groovy.util.logging.Slf4j | ||
import spock.lang.Shared | ||
import spock.lang.Specification | ||
|
||
@Slf4j | ||
class KsqlRestAuthTest extends Specification { | ||
|
||
@Shared | ||
String pipelineEndpoint = System.getProperty("pipelineEndpoint") ?: 'http://localhost:8088' | ||
String username = System.getProperty("pipelineUsername") ?: 'test' | ||
String password = System.getProperty("pipelinePassword") ?: 'test' | ||
|
||
@Shared | ||
def ksqlRest = new KsqlRest(restUrl: pipelineEndpoint, username: username, password: password) | ||
|
||
def "KSQL Server properties fetched"() { | ||
|
||
when: | ||
def result = ksqlRest.getProperties() | ||
|
||
then: | ||
log.warn "result: ${result.toString()}" | ||
result | ||
} | ||
|
||
def "KSQL extension directory path is returned"() { | ||
|
||
when: | ||
def path = ksqlRest.getExtensionPath() | ||
|
||
then: | ||
path | ||
} | ||
|
||
def "KSQL extension directory file is returned"() { | ||
|
||
when: | ||
def dir = ksqlRest.getExtensionDir() | ||
|
||
then: | ||
dir | ||
} | ||
|
||
def "KSQL REST URL is returned"() { | ||
|
||
when: | ||
def url = ksqlRest.getSchemaRegistry() | ||
|
||
then: | ||
url | ||
} | ||
|
||
def "List of topics returned"() { | ||
|
||
when: | ||
def topics = ksqlRest.getTopics() | ||
|
||
then: | ||
topics | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters