Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix] Re-enable missing essential tests #1195

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions essential-tests/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ dependencies {
testFixturesImplementation(project(":wallet-reference-server"))
testFixturesImplementation(project(":service-runner"))
testFixturesImplementation(project(":lib-util"))

testImplementation(libs.stellar.wallet.sdk)
}

tasks { bootJar { enabled = false } }
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
package org.stellar.anchor
package org.stellar.anchor.platform

import io.ktor.client.plugins.*
import io.ktor.http.*
import kotlinx.coroutines.runBlocking
import org.stellar.anchor.client.*
import org.stellar.anchor.platform.TestConfig
import org.stellar.anchor.platform.resourceAsString
import org.stellar.anchor.util.Sep1Helper.TomlContent
import org.stellar.anchor.util.Sep1Helper.parse
import org.stellar.walletsdk.ApplicationConfiguration
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.stellar.anchor
package org.stellar.anchor.platform

var CLIENT_WALLET_SECRET = "SBHTWEF5U7FK53FLGDMBQYGXRUJ24VBM3M6VDXCHRIGCRG3Z64PH45LW"
var CLIENT_WALLET_ACCOUNT = "GDJLBYYKMCXNVVNABOE66NYXQGIA5AC5D223Z2KF6ZEYK4UBCA7FKLTG"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.stellar.anchor.e2etest
package org.stellar.anchor.platform.e2etest

import io.ktor.client.*
import io.ktor.client.plugins.*
Expand All @@ -22,8 +22,6 @@ import org.junit.jupiter.params.ParameterizedTest
import org.junit.jupiter.params.provider.Arguments
import org.junit.jupiter.params.provider.MethodSource
import org.springframework.web.util.UriComponentsBuilder
import org.stellar.anchor.AbstractIntegrationTests
import org.stellar.anchor.CLIENT_WALLET_SECRET
import org.stellar.anchor.api.callback.SendEventRequest
import org.stellar.anchor.api.callback.SendEventRequestPayload
import org.stellar.anchor.api.event.AnchorEvent
Expand All @@ -33,6 +31,8 @@ import org.stellar.anchor.api.sep.SepTransactionStatus
import org.stellar.anchor.api.sep.sep24.Sep24GetTransactionResponse
import org.stellar.anchor.auth.JwtService
import org.stellar.anchor.auth.Sep24InteractiveUrlJwt
import org.stellar.anchor.platform.AbstractIntegrationTests
import org.stellar.anchor.platform.CLIENT_WALLET_SECRET
import org.stellar.anchor.platform.TestConfig
import org.stellar.anchor.util.Log.info
import org.stellar.reference.client.AnchorReferenceServerClient
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.stellar.anchor.e2etest
package org.stellar.anchor.platform.e2etest

import io.ktor.http.*
import kotlin.test.DefaultAsserter.fail
Expand All @@ -9,12 +9,12 @@ import kotlinx.coroutines.delay
import kotlinx.coroutines.runBlocking
import org.junit.jupiter.api.Disabled
import org.junit.jupiter.api.Test
import org.stellar.anchor.AbstractIntegrationTests
import org.stellar.anchor.api.sep.SepTransactionStatus
import org.stellar.anchor.api.sep.SepTransactionStatus.*
import org.stellar.anchor.api.sep.sep6.GetTransactionResponse
import org.stellar.anchor.api.shared.InstructionField
import org.stellar.anchor.client.Sep6Client
import org.stellar.anchor.platform.AbstractIntegrationTests
import org.stellar.anchor.platform.TestConfig
import org.stellar.anchor.util.GsonUtils
import org.stellar.anchor.util.Log
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.stellar.anchor.integrationtest
package org.stellar.anchor.platform.integrationtest

import com.google.gson.Gson
import java.time.Instant
Expand All @@ -13,7 +13,6 @@ import org.junit.jupiter.api.Assertions.assertEquals
import org.junit.jupiter.api.parallel.Execution
import org.junit.jupiter.api.parallel.ExecutionMode
import org.skyscreamer.jsonassert.JSONAssert
import org.stellar.anchor.AbstractIntegrationTests
import org.stellar.anchor.api.callback.GetCustomerRequest
import org.stellar.anchor.api.callback.GetFeeRequest
import org.stellar.anchor.api.callback.GetRateRequest
Expand All @@ -22,12 +21,13 @@ import org.stellar.anchor.api.sep.sep12.Sep12PutCustomerRequest
import org.stellar.anchor.auth.AuthHelper
import org.stellar.anchor.auth.JwtService
import org.stellar.anchor.client.Sep12Client
import org.stellar.anchor.integrationtest.Sep12Tests.Companion.testCustomer1Json
import org.stellar.anchor.integrationtest.Sep12Tests.Companion.testCustomer2Json
import org.stellar.anchor.platform.AbstractIntegrationTests
import org.stellar.anchor.platform.TestConfig
import org.stellar.anchor.platform.callback.RestCustomerIntegration
import org.stellar.anchor.platform.callback.RestFeeIntegration
import org.stellar.anchor.platform.callback.RestRateIntegration
import org.stellar.anchor.platform.integrationtest.Sep12Tests.Companion.testCustomer1Json
import org.stellar.anchor.platform.integrationtest.Sep12Tests.Companion.testCustomer2Json
import org.stellar.anchor.util.GsonUtils

@TestInstance(TestInstance.Lifecycle.PER_CLASS)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.stellar.anchor.integrationtest
package org.stellar.anchor.platform.integrationtest

import org.junit.jupiter.api.Assertions.assertFalse
import org.junit.jupiter.api.Assertions.assertTrue
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package org.stellar.anchor.integrationtest
package org.stellar.anchor.platform.integrationtest

import org.junit.jupiter.api.Test
import org.stellar.anchor.AbstractIntegrationTests
import org.stellar.anchor.api.event.AnchorEvent
import org.stellar.anchor.event.EventService.EventQueue.TRANSACTION
import org.stellar.anchor.platform.AbstractIntegrationTests
import org.stellar.anchor.platform.TestConfig
import org.stellar.anchor.platform.config.PropertyEventConfig
import org.stellar.anchor.platform.event.DefaultEventService
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.stellar.anchor.integrationtest
package org.stellar.anchor.platform.integrationtest

import com.google.gson.reflect.TypeToken
import org.apache.http.HttpStatus.SC_OK
Expand All @@ -8,7 +8,6 @@ import org.skyscreamer.jsonassert.Customization
import org.skyscreamer.jsonassert.JSONAssert
import org.skyscreamer.jsonassert.JSONCompareMode
import org.skyscreamer.jsonassert.comparator.CustomComparator
import org.stellar.anchor.AbstractIntegrationTests
import org.stellar.anchor.api.rpc.RpcRequest
import org.stellar.anchor.api.rpc.method.NotifyOffchainFundsReceivedRequest
import org.stellar.anchor.api.rpc.method.RequestOffchainFundsRequest
Expand All @@ -22,6 +21,7 @@ import org.stellar.anchor.auth.AuthHelper
import org.stellar.anchor.client.Sep12Client
import org.stellar.anchor.client.Sep24Client
import org.stellar.anchor.client.Sep31Client
import org.stellar.anchor.platform.AbstractIntegrationTests
import org.stellar.anchor.platform.TestConfig
import org.stellar.anchor.util.GsonUtils

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package org.stellar.anchor.platform.integrationtest

// The test is removed in favor of Sep24Tests.kt
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
package org.stellar.anchor.integrationtest
package org.stellar.anchor.platform.integrationtest

import kotlin.test.assertFailsWith
import org.junit.jupiter.api.Test
import org.stellar.anchor.*
import org.stellar.anchor.api.exception.SepNotAuthorizedException
import org.stellar.anchor.api.sep.sep10.ValidationRequest
import org.stellar.anchor.client.Sep10Client
import org.stellar.anchor.platform.TestConfig
import org.stellar.anchor.platform.*

class Sep10Tests : AbstractIntegrationTests(TestConfig(testProfileName = "default")) {
lateinit var sep10Client: Sep10Client
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package org.stellar.anchor.integrationtest
package org.stellar.anchor.platform.integrationtest

import io.ktor.client.plugins.*
import kotlinx.coroutines.runBlocking
import kotlinx.serialization.json.Json
import org.junit.jupiter.api.Assertions.assertEquals
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.assertThrows
import org.stellar.anchor.AbstractIntegrationTests
import org.stellar.anchor.api.sep.sep12.Sep12Status
import org.stellar.anchor.platform.AbstractIntegrationTests
import org.stellar.anchor.platform.TestConfig
import org.stellar.anchor.platform.printRequest
import org.stellar.anchor.platform.printResponse
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.stellar.anchor.integrationtest
package org.stellar.anchor.platform.integrationtest

import com.google.gson.reflect.TypeToken
import kotlinx.coroutines.runBlocking
Expand All @@ -13,14 +13,14 @@ import org.junit.jupiter.api.parallel.ExecutionMode.SAME_THREAD
import org.skyscreamer.jsonassert.JSONAssert
import org.skyscreamer.jsonassert.JSONCompareMode
import org.springframework.web.util.UriComponentsBuilder
import org.stellar.anchor.AbstractIntegrationTests
import org.stellar.anchor.api.exception.SepException
import org.stellar.anchor.api.platform.PatchTransactionsRequest
import org.stellar.anchor.apiclient.PlatformApiClient
import org.stellar.anchor.auth.AuthHelper
import org.stellar.anchor.auth.JwtService
import org.stellar.anchor.auth.Sep24InteractiveUrlJwt
import org.stellar.anchor.auth.Sep24MoreInfoUrlJwt
import org.stellar.anchor.platform.AbstractIntegrationTests
import org.stellar.anchor.platform.TestConfig
import org.stellar.anchor.platform.gson
import org.stellar.anchor.platform.printRequest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.stellar.anchor.integrationtest
package org.stellar.anchor.platform.integrationtest

import java.time.Instant
import kotlin.streams.toList
Expand All @@ -11,7 +11,6 @@ import org.skyscreamer.jsonassert.JSONCompareMode
import org.skyscreamer.jsonassert.JSONCompareMode.LENIENT
import org.springframework.data.domain.Sort.Direction
import org.springframework.data.domain.Sort.Direction.*
import org.stellar.anchor.AbstractIntegrationTests
import org.stellar.anchor.api.exception.SepException
import org.stellar.anchor.api.platform.*
import org.stellar.anchor.api.platform.PlatformTransactionData.Sep.SEP_31
Expand All @@ -27,10 +26,11 @@ import org.stellar.anchor.api.sep.sep31.Sep31PostTransactionResponse
import org.stellar.anchor.apiclient.PlatformApiClient
import org.stellar.anchor.auth.AuthHelper
import org.stellar.anchor.client.*
import org.stellar.anchor.integrationtest.Sep12Tests.Companion.testCustomer1Json
import org.stellar.anchor.integrationtest.Sep12Tests.Companion.testCustomer2Json
import org.stellar.anchor.platform.AbstractIntegrationTests
import org.stellar.anchor.platform.TestConfig
import org.stellar.anchor.platform.gson
import org.stellar.anchor.platform.integrationtest.Sep12Tests.Companion.testCustomer1Json
import org.stellar.anchor.platform.integrationtest.Sep12Tests.Companion.testCustomer2Json
import org.stellar.anchor.platform.printRequest
import org.stellar.anchor.util.GsonUtils
import org.stellar.anchor.util.StringHelper.json
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package org.stellar.anchor.integrationtest
package org.stellar.anchor.platform.integrationtest

import java.time.Instant
import java.time.format.DateTimeFormatter
import kotlin.test.assertEquals
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.assertThrows
import org.stellar.anchor.AbstractIntegrationTests
import org.stellar.anchor.api.exception.SepException
import org.stellar.anchor.api.sep.sep38.Sep38Context.SEP31
import org.stellar.anchor.client.Sep38Client
import org.stellar.anchor.platform.AbstractIntegrationTests
import org.stellar.anchor.platform.TestConfig
import org.stellar.anchor.platform.printRequest
import org.stellar.anchor.platform.printResponse
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package org.stellar.anchor.integrationtest
package org.stellar.anchor.platform.integrationtest

import org.junit.jupiter.api.Test
import org.skyscreamer.jsonassert.JSONAssert
import org.skyscreamer.jsonassert.JSONCompareMode
import org.stellar.anchor.AbstractIntegrationTests
import org.stellar.anchor.CLIENT_WALLET_ACCOUNT
import org.stellar.anchor.api.sep.sep38.Sep38Context
import org.stellar.anchor.client.Sep38Client
import org.stellar.anchor.client.Sep6Client
import org.stellar.anchor.platform.AbstractIntegrationTests
import org.stellar.anchor.platform.CLIENT_WALLET_ACCOUNT
import org.stellar.anchor.platform.TestConfig
import org.stellar.anchor.platform.gson
import org.stellar.anchor.util.Log
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.stellar.anchor.integrationtest
package org.stellar.anchor.platform.integrationtest

import org.junit.jupiter.api.Assertions
import org.junit.jupiter.api.Test
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package org.stellar.anchor.integrationtest
package org.stellar.anchor.platform.integrationtest

import java.util.concurrent.TimeUnit
import okhttp3.OkHttpClient
import okhttp3.Request
import org.junit.jupiter.api.Assertions
import org.junit.jupiter.api.Test
import org.stellar.anchor.AbstractIntegrationTests
import org.stellar.anchor.platform.AbstractIntegrationTests
import org.stellar.anchor.platform.TestConfig
import org.stellar.anchor.platform.gson

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package org.stellar.anchor.platform
import io.ktor.client.plugins.*
import io.ktor.http.*
import kotlinx.coroutines.runBlocking
import org.stellar.anchor.CLIENT_WALLET_SECRET
import org.stellar.anchor.platform.test.*
import org.stellar.anchor.util.Sep1Helper
import org.stellar.walletsdk.ApplicationConfiguration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import kotlinx.coroutines.runBlocking
import org.assertj.core.api.Assertions
import org.junit.jupiter.api.Assertions.assertNotNull
import org.springframework.web.util.UriComponentsBuilder
import org.stellar.anchor.CLIENT_WALLET_SECRET
import org.stellar.anchor.api.callback.SendEventRequest
import org.stellar.anchor.api.callback.SendEventRequestPayload
import org.stellar.anchor.api.event.AnchorEvent
Expand All @@ -22,6 +21,7 @@ import org.stellar.anchor.api.sep.SepTransactionStatus
import org.stellar.anchor.api.sep.sep24.Sep24GetTransactionResponse
import org.stellar.anchor.auth.JwtService
import org.stellar.anchor.auth.Sep24InteractiveUrlJwt
import org.stellar.anchor.platform.CLIENT_WALLET_SECRET
import org.stellar.anchor.platform.TestConfig
import org.stellar.anchor.util.Log.info
import org.stellar.reference.client.AnchorReferenceServerClient
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import kotlinx.coroutines.runBlocking
import org.assertj.core.api.Assertions
import org.junit.jupiter.api.Assertions.assertNotNull
import org.springframework.web.util.UriComponentsBuilder
import org.stellar.anchor.CLIENT_WALLET_SECRET
import org.stellar.anchor.api.callback.SendEventRequest
import org.stellar.anchor.api.callback.SendEventRequestPayload
import org.stellar.anchor.api.event.AnchorEvent
Expand All @@ -22,6 +21,7 @@ import org.stellar.anchor.api.sep.SepTransactionStatus
import org.stellar.anchor.api.sep.sep24.Sep24GetTransactionResponse
import org.stellar.anchor.auth.JwtService
import org.stellar.anchor.auth.Sep24InteractiveUrlJwt
import org.stellar.anchor.platform.CLIENT_WALLET_SECRET
import org.stellar.anchor.platform.TestConfig
import org.stellar.anchor.util.Log.info
import org.stellar.reference.client.AnchorReferenceServerClient
Expand Down
Loading
Loading