Skip to content
Snippets Groups Projects
Select Git revision
  • d184022278dcc8eda19e030799fbaff73950940a
  • master default protected
  • add-frequency-to-form
  • dev protected
  • ckan-2.11.0
  • add-package-custom-fields
  • fix-adding-datasets-for-users-and-editors
  • add-auth-subroute
  • 71-migrate-custom-fields-to-ckanext-scheming
  • add-author-maintainer-information
  • fix-inline-flex-btns
  • fix-known-spatial-uri-validation
  • py3
  • 47-aktuelle-resource-einer-collection-wird-nicht-mehr-gefunden
  • 10-eingabe-der-dct-accrualperiodicity-in-weboberflache
  • v1.3
  • 2.5.3
  • 2.5.2
  • 2.5.1
  • 2.5.0
  • 2.4.7
  • 2.4.6
  • 2.4.5
  • 2.4.4
  • 2.4.3
  • 2.4.2
  • 2.4.1
  • 2.4.0
  • 2.3.1
  • 2.3.0
  • 2.2.0
  • 2.1.0
  • 2.0.0
  • 1.4.3
  • 1.4.2
  • 1.4.1
36 results

helpers.py

Blame
  • MongoConfigServerTest.java 1.16 KiB
    package de.ozgcloud.admin.environment;
    
    import static org.junit.jupiter.api.Assertions.*;
    
    import org.junit.jupiter.api.Test;
    import org.springframework.boot.test.context.SpringBootTest;
    import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
    import org.springframework.boot.test.web.client.TestRestTemplate;
    import org.springframework.boot.test.web.server.LocalServerPort;
    import org.springframework.cloud.config.environment.Environment;
    import org.springframework.http.HttpStatus;
    import org.springframework.http.ResponseEntity;
    
    import de.ozgcloud.admin.AdministrationApplication;
    
    @SpringBootTest(classes = AdministrationApplication.class, webEnvironment = WebEnvironment.DEFINED_PORT)
    class MongoConfigServerTest {
    	private final String APPNAME = "testapp";
    	private final String PROFILE = "testprofile";
    	private final String LABEL = "testlabel";
    	@LocalServerPort
    	private int port;
    
    	@Test
    	void shouldHaveHttpEndpoint() {
    		ResponseEntity<Environment> response = new TestRestTemplate().getForEntity("http://localhost:"
    				+ port + "/" + APPNAME + "/" + PROFILE + "/" + LABEL, Environment.class);
    		assertEquals(HttpStatus.OK, response.getStatusCode());
    	}
    }