Repository: TBD54566975/ssi-service
Pull request #195 (2022-12-02 17:48:58)

Add did web integ test
Adding new did:web test.

This test runs the steelthread workflow but with a did:web instead.




codecov-commenter: # [Codecov](https://codecov.io/gh/TBD54566975/ssi-service/pull/195?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TBD54566975) Report
> Merging [#195](https://codecov.io/gh/TBD54566975/ssi-service/pull/195?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TBD54566975) (a879ee9) into [main](https://codecov.io/gh/TBD54566975/ssi-service/commit/8ecadacbbbe5525cd8628aa1c9639656999145dc?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TBD54566975) (8ecadac) will **not change** coverage.
> The diff coverage is `n/a`.

```diff
@@           Coverage Diff           @@
##             main     #195   +/-   ##
=======================================
  Coverage   25.64%   25.64%           
=======================================
  Files          23       23           
  Lines        1829     1829           
=======================================
  Hits          469      469           
  Misses       1284     1284           
  Partials       76       76           
```



Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TBD54566975). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=TBD54566975)

nitro-neal: ❯ mage test
[test -tags=jwx_es256k -race -short ./...]?   	github.com/tbd54566975/ssi-service/cmd	[no test files]
ok  	github.com/tbd54566975/ssi-service/config	(cached)
ok  	github.com/tbd54566975/ssi-service/integration	0.173s
?   	github.com/tbd54566975/ssi-service/internal/credential	[no test files]
ok  	github.com/tbd54566975/ssi-service/internal/did	(cached)
ok  	github.com/tbd54566975/ssi-service/internal/keyaccess	(cached)
?   	github.com/tbd54566975/ssi-service/internal/schema	[no test files]
ok  	github.com/tbd54566975/ssi-service/internal/util	(cached)
?   	github.com/tbd54566975/ssi-service/pkg/jwt	[no test files]
ok  	github.com/tbd54566975/ssi-service/pkg/server	135.200s
?   	github.com/tbd54566975/ssi-service/pkg/server/framework	[no test files]
?   	github.com/tbd54566975/ssi-service/pkg/server/middleware	[no test files]
ok  	github.com/tbd54566975/ssi-service/pkg/server/router	12.859s
?   	github.com/tbd54566975/ssi-service/pkg/service	[no test files]
?   	github.com/tbd54566975/ssi-service/pkg/service/credential	[no test files]
?   	github.com/tbd54566975/ssi-service/pkg/service/credential/storage	[no test files]
?   	github.com/tbd54566975/ssi-service/pkg/service/did	[no test files]
?   	github.com/tbd54566975/ssi-service/pkg/service/did/storage	[no test files]
?   	github.com/tbd54566975/ssi-service/pkg/service/framework	[no test files]
ok  	github.com/tbd54566975/ssi-service/pkg/service/keystore	1.641s
?   	github.com/tbd54566975/ssi-service/pkg/service/keystore/storage	[no test files]
?   	github.com/tbd54566975/ssi-service/pkg/service/manifest	[no test files]
?   	github.com/tbd54566975/ssi-service/pkg/service/manifest/storage	[no test files]
ok  	github.com/tbd54566975/ssi-service/pkg/service/operation	0.392s
?   	github.com/tbd54566975/ssi-service/pkg/service/operation/storage	[no test files]
?   	github.com/tbd54566975/ssi-service/pkg/service/presentation	[no test files]
?   	github.com/tbd54566975/ssi-service/pkg/service/presentation/storage	[no test files]
?   	github.com/tbd54566975/ssi-service/pkg/service/schema	[no test files]
?   	github.com/tbd54566975/ssi-service/pkg/service/schema/storage	[no test files]
ok  	github.com/tbd54566975/ssi-service/pkg/storage	0.443s

❯ mage integration
[test -tags=jwx_es256k -race ./integration]ok  	github.com/tbd54566975/ssi-service/integration

This change does a few things:
Full refactor of our integration tests, now it uses the golang testing framework and is run with 'mage integration'
Fixed a bug in cred revocation with status not updating properly
Steelthread integration test rewrite
Did:web full integration test
Revocation full integration test

Patch:
diff --git a/.github/workflows/steelthread.yml b/.github/workflows/steelthread.yml
index 683cf69..dd3e691 100644
--- a/.github/workflows/steelthread.yml
+++ b/.github/workflows/steelthread.yml
@@ -29,7 +29,7 @@ jobs:
       run: docker-compose -f "build/docker-compose.yml" up -d --build
 
     - name: End To End Test
-      run: mage integration steelthread
+      run: mage integration
 
     - name: Stop containers
       if: always()
diff --git a/config/compose.toml b/config/compose.toml
index c3826c4..799a0d0 100644
--- a/config/compose.toml
+++ b/config/compose.toml
@@ -1,7 +1,7 @@
 title = "SSI Service Config"
 
 svn = "0.0.1"
-desc = "Configuration to be used while running the servicd with docker compose."
+desc = "Configuration to be used while running the service with docker compose."
 
 # http service configuration
 [server]
@@ -21,7 +21,7 @@ log_level = "info"
 
 [services]
 storage = "bolt"
-service_endpoint = "http://localhost:8000"
+service_endpoint = "http://localhost:8080"
 
 # per-service configuration
 [services.keystore]
diff --git a/config/config.go b/config/config.go
index 2ea145d..f4f4dff 100644
--- a/config/config.go
+++ b/config/config.go
@@ -19,7 +19,7 @@ const (
 	ServiceName       = "ssi-service"
 	ConfigExtension   = ".toml"
 
-	DefaultServiceEndpoint = "http://localhost:8000"
+	DefaultServiceEndpoint = "http://localhost:8080"
 )
 
 type SSIServiceConfig struct {
diff --git a/config/config.toml b/config/config.toml
index e1c7b1e..a1a8b56 100644
--- a/config/config.toml
+++ b/config/config.toml
@@ -19,7 +19,7 @@ log_level = "debug"
 
 [services]
 storage = "bolt"
-service_endpoint = "http://localhost:8000"
+service_endpoint = "http://localhost:8080"
 
 # per-service configuration
 [services.keystore]
diff --git a/integration/common.go b/integration/common.go
new file mode 100644
index 0000000..f05aa78
--- /dev/null
+++ b/integration/common.go
@@ -0,0 +1,245 @@
+package integration
+
+import (
+	"bytes"
+	"embed"
+	cmpact "github.com/goccy/go-json"
+	"github.com/goccy/go-json"
+	"fmt"
+	manifestsdk "github.com/TBD54566975/ssi-sdk/credential/manifest"
+	"github.com/TBD54566975/ssi-sdk/crypto"
+	"github.com/mr-tron/base58"
+	"github.com/oliveagle/jsonpath"
+	"github.com/pkg/errors"
+	"github.com/sirupsen/logrus"
+	credmodel "github.com/tbd54566975/ssi-service/internal/credential"
+	"github.com/tbd54566975/ssi-service/internal/keyaccess"
+	"io"
+	"net/http"
+	"strings"
+)
+
+const (
+	endpoint = "http://localhost:8080/"
+	version  = "v1/"
+)
+
+var (
+	//go:embed testdata
+	testVectors embed.FS
+	client      = new(http.Client)
+)
+
+func CreateDIDKey() (string, error) {
+	logrus.Println("\n\nCreate a did for the issuer:")
+	output, err := put(endpoint+version+"dids/key", getJSONFromFile("did-input.json"))
+	if err != nil {
+		return "", errors.Wrapf(err, "did endpoint with output: %s", output)
+	}
+
+	return output, nil
+}
+
+func CreateDIDWeb() (string, error) {
+	logrus.Println("\n\nCreate a did:web")
+	output, err := put(endpoint+version+"dids/web", getJSONFromFile("did-web-input.json"))
+	if err != nil {
+		return "", errors.Wrapf(err, "did endpoint with output: %s", output)
+	}
+
+	return output, nil
+}
+
+func CreateKYCSchema() (string, error) {
+	logrus.Println("\n\nCreate a schema")
+	output, err := put(endpoint+version+"schemas", getJSONFromFile("schema-input.json"))
+	if err != nil {
+		return "", errors.Wrapf(err, "schema endpoint with output: %s", output)
+	}
+
+	return output, nil
+}
+
+func CreateVerifiableCredential(issuerDID, schemaID string, revocable bool) (string, error) {
+	logrus.Println("\n\nCreate a verifiable credential")
+
+	credentialJSON := getJSONFromFile("credential-input.json")
+
+	if revocable == true {
+		credentialJSON = getJSONFromFile("credential-revocable-input.json")
+	}
+
+	credentialJSON = strings.ReplaceAll(credentialJSON, "<CREDISSUERID>", issuerDID)
+	credentialJSON = strings.ReplaceAll(credentialJSON, "<CREDSUBJECTID>", issuerDID)
+	credentialJSON = strings.ReplaceAll(credentialJSON, "<SCHEMAID>", schemaID)
+
+	output, err := put(endpoint+version+"credentials", credentialJSON)
+	if err != nil {
+		return "", errors.Wrapf(err, "credentials endpoint with output: %s", output)
+	}
+
+	return output, nil
+}
+
+func CreateCredentialManifest(issuerDID, schemaID string) (string, error) {
+	logrus.Println("\n\nCreate our Credential Manifest:")
+	manifestJSON := getJSONFromFile("manifest-input.json")
+	manifestJSON = strings.ReplaceAll(manifestJSON, "<SCHEMAID>", schemaID)
+	manifestJSON = strings.ReplaceAll(manifestJSON, "<ISSUERID>", issuerDID)
+	output, err := put(endpoint+version+"manifests", manifestJSON)
+	if err != nil {
+		return "", errors.Wrapf(err, "manifest endpoint with output: %s", output)
+	}
+
+	return output, nil
+}
+
+func CreateCredentialApplicationJWT(presentationDefinitionID, credentialJWT, manifestID, aliceDID, aliceDIDPrivateKey string) (string, error) {
+	logrus.Println("\n\nCreate an Application JWT:")
+	applicationJSON := getJSONFromFile("application-input.json")
+	applicationJSON = strings.ReplaceAll(applicationJSON, "<DEFINITIONID>", presentationDefinitionID)
+	applicationJSON = strings.ReplaceAll(applicationJSON, "<VCJWT>", credentialJWT)
+	applicationJSON = strings.ReplaceAll(applicationJSON, "<MANIFESTID>", manifestID)
+
+	alicePrivKeyBytes, err := base58.Decode(aliceDIDPrivateKey)
+	if err != nil {
+		return "", errors.Wrap(err, "base58 decoding")
+	}
+
+	alicePrivKey, err := crypto.BytesToPrivKey(alicePrivKeyBytes, crypto.Ed25519)
+	if err != nil {
+		return "", errors.Wrap(err, "bytes to priv key")
+	}
+
+	signer, err := keyaccess.NewJWKKeyAccess(aliceDID, alicePrivKey)
+	if err != nil {
+		return "", errors.Wrap(err, "creating signer")
+	}
+
+	credAppWrapper := getValidApplicationRequest(applicationJSON, credentialJWT)
+
+	signed, err := signer.SignJSON(credAppWrapper)
+	if err != nil {
+		return "", errors.Wrap(err, "signing json")
+	}
+
+	return signed.String(), nil
+}
+
+func SubmitApplication(credAppJWT string) (string, error) {
+
+	trueApplicationJSON := getJSONFromFile("application-input-jwt.json")
+	trueApplicationJSON = strings.ReplaceAll(trueApplicationJSON, "<APPLICATIONJWT>", credAppJWT)
+
+	output, err := put(endpoint+version+"manifests/applications", trueApplicationJSON)
+	if err != nil {
+		return "", errors.Wrapf(err, "application endpoint with output: %s", output)
+	}
+
+	return output, nil
+}
+
+func compactJSONOutput(json string) string {
+	jsonBytes := []byte(json)
+	buffer := new(bytes.Buffer)
+	if err := cmpact.Compact(buffer, jsonBytes); err != nil {
+		logrus.Println(err)
+		panic(err)
+	}
+
+	return buffer.String()
+}
+
+func getJSONElement(jsonString string, jsonPath string) (string, error) {
+	jsonMap := make(map[string]interface{})
+	if err := json.Unmarshal([]byte(jsonString), &jsonMap); err != nil {
+		return "", errors.Wrap(err, "unmarshalling json string")
+	}
+
+	element, err := jsonpath.JsonPathLookup(jsonMap, jsonPath)
+	if err != nil {
+		return "", errors.Wrap(err, "finding element in json string")
+	}
+
+	elementStr := fmt.Sprintf("%v", element)
+	return elementStr, nil
+}
+
+func get(url string) (string, error) {
+	logrus.Println(fmt.Sprintf("\nPerforming GET request to:  %s\n", url))
+
+	resp, err := http.Get(url) // #nosec: testing only.
+	if err != nil {
+		return "", errors.Wrapf(err, "getting url: %s", url)
+	}
+
+	body, err := io.ReadAll(resp.Body)
+	if err != nil {
+		return "", errors.Wrap(err, "parsing body")
+	}
+
+	if is2xxResponse(resp.StatusCode) {
+		return "", fmt.Errorf("status code not in the 200s. body: %s", string(body))
+	}
+
+	return string(body), err
+}
+
+func put(url string, json string) (string, error) {
+	logrus.Println(fmt.Sprintf("\nPerforming PUT request to:  %s \n\nwith data: \n%s\n", url, compactJSONOutput(json)))
+
+	req, err := http.NewRequest(http.MethodPut, url, bytes.NewBuffer([]byte(json)))
+	if err != nil {
+		return "", errors.Wrap(err, "building http req")
+	}
+
+	req.Header.Set("Content-Type", "application/json")
+	resp, err := client.Do(req)
+	if err != nil {
+		return "", errors.Wrap(err, "client http client")
+	}
+
+	body, err := io.ReadAll(resp.Body)
+	if err != nil {
+		return "", errors.Wrap(err, "parsing body")
+	}
+
+	if is2xxResponse(resp.StatusCode) {
+		return "", fmt.Errorf("status code %v not in the 200s. body: %s", resp.StatusCode, string(body))
+	}
+
+	logrus.Println("\nOutput:")
+	logrus.Println(string(body))
+
+	return string(body), err
+}
+
+func getJSONFromFile(fileName string) string {
+	b, _ := testVectors.ReadFile("testdata/" + fileName)
+	return string(b)
+}
+
+func is2xxResponse(statusCode int) bool {
+	return statusCode/100 != 2
+}
+
+func getValidApplicationRequest(credAppJSON string, credentialJWT string) manifestsdk.CredentialApplicationWrapper {
+	var createApplication manifestsdk.CredentialApplication
+	if err := json.Unmarshal([]byte(credAppJSON), &createApplication); err != nil {
+		logrus.Println("unmarshal error")
+		panic(err)
+	}
+
+	contain, err := credmodel.NewCredentialContainerFromJWT(credentialJWT)
+	if err != nil {
+		logrus.Println("making NewCredentialContainerFromJWT")
+		panic(err)
+	}
+	contains := []credmodel.Container{*contain}
+
+	creds := credmodel.ContainersToInterface(contains)
+	return manifestsdk.CredentialApplicationWrapper{
+		CredentialApplication: createApplication,
+		Credentials:           creds,
+	}
+}
diff --git a/magefile.go b/magefile.go
index 4c51f28..4e8bbad 100644
--- a/magefile.go
+++ b/magefile.go
@@ -18,8 +18,6 @@ import (
 	"github.com/magefile/mage/mg"
 	"github.com/magefile/mage/sh"
 	"golang.org/x/crypto/ssh/terminal"
-
-	steelthread "github.com/tbd54566975/ssi-service/test"
 )
 
 var (
@@ -101,6 +99,12 @@ func CITest() error {
 	return runCITests()
 }
 
+// Test runs unit tests without coverage.
+// The mage `-v` option will trigger a verbose output of the test
+func Integration() error {
+	return runIntegrationTests()
+}
+
 // Spec generates an OpenAPI spec yaml based on code annotations.
 func Spec() error {
 	swagCommand := "swag"
@@ -116,17 +120,6 @@ func Spec() error {
 	return sh.Run(swagCommand, "init", "-g", "cmd/main.go", "--pd", "-o", "doc", "-ot", "yaml", "--parseDepth=3", "--parseGoList=false")
 }
 
-// Integration runs an integration test. Note: the ssi-service must be running for this to work
-func Integration(testName string) error {
-	switch testName {
-	case "steelthread":
-		return steelthread.RunTest()
-	default:
-		fmt.Println("Running all tests")
-		return steelthread.RunTest()
-	}
-}
-
 func runCITests(extraTestArgs ...string) error {
 	args := []string{"test"}
 	if mg.Verbose() {
@@ -136,6 +129,7 @@ func runCITests(extraTestArgs ...string) error {
 	args = append(args, "-covermode=atomic")
 	args = append(args, "-coverprofile=coverage.out")
 	args = append(args, "-race")
+	args = append(args, "-short")
 	args = append(args, extraTestArgs...)
 	args = append(args, "./...")
 	testEnv := map[string]string{
@@ -155,6 +149,7 @@ func runTests(extraTestArgs ...string) error {
 	}
 	args = append(args, "-tags=jwx_es256k")
 	args = append(args, "-race")
+	args = append(args, "-short")
 	args = append(args, extraTestArgs...)
 	args = append(args, "./...")
 	testEnv := map[string]string{
@@ -167,6 +162,25 @@ func runTests(extraTestArgs ...string) error {
 	return err
 }
 
+func runIntegrationTests(extraTestArgs ...string) error {
+	args := []string{"test"}
+	if mg.Verbose() {
+		args = append(args, "-v")
+	}
+	args = append(args, "-tags=jwx_es256k")
+	args = append(args, "-race")
+	args = append(args, extraTestArgs...)
+	args = append(args, "./integration")
+	testEnv := map[string]string{
+		"CGO_ENABLED": "1",
+		"GO111MODULE": "on",
+	}
+	writer := ColorizeTestStdout()
+	fmt.Printf("%+v", args)
+	_, err := sh.Exec(testEnv, writer, os.Stderr, Go, args...)
+	return err
+}
+
 func ColorizeTestOutput(w io.Writer) io.Writer {
 	writer := NewRegexpWriter(w, `PASS.*`, "\033[32m$0\033[0m")
 	return NewRegexpWriter(writer, `FAIL.*`, "\033[31m$0\033[0m")
diff --git a/pkg/server/router/credential.go b/pkg/server/router/credential.go
index d3e1d4d..4225fb0 100644
--- a/pkg/server/router/credential.go
+++ b/pkg/server/router/credential.go
@@ -169,7 +169,7 @@ func (cr CredentialRouter) GetCredentialStatus(ctx context.Context, w http.Respo
 		return framework.NewRequestErrorMsg(errMsg, http.StatusBadRequest)
 	}
 
-	gotCredential, err := cr.service.GetCredential(credential.GetCredentialRequest{ID: *id})
+	getCredentialStatusResponse, err := cr.service.GetCredentialStatus(credential.GetCredentialStatusRequest{ID: *id})
 	if err != nil {
 		errMsg := fmt.Sprintf("could not get credential with id: %s", *id)
 		logrus.WithError(err).Error(errMsg)
@@ -177,7 +177,7 @@ func (cr CredentialRouter) GetCredentialStatus(ctx context.Context, w http.Respo
 	}
 
 	resp := GetCredentialStatusResponse{
-		Revoked: gotCredential.Revoked,
+		Revoked: getCredentialStatusResponse.Revoked,
 	}
 
 	return framework.Respond(ctx, w, resp, http.StatusOK)
diff --git a/pkg/service/credential/service.go b/pkg/service/credential/service.go
index 3bd2bf6..810336a 100644
--- a/pkg/service/credential/service.go
+++ b/pkg/service/credential/service.go
@@ -441,7 +441,8 @@ func (s Service) GetCredentialStatus(request GetCredentialStatusRequest) (*GetCr
 func (s Service) GetCredentialStatusList(request GetCredentialStatusListRequest) (*GetCredentialStatusListResponse, error) {
 	logrus.Debugf("getting credential status list: %s", request.ID)
 
-	gotCred, err := s.storage.GetStatusListCredential(request.ID)
+	credStatusListID := fmt.Sprintf(`%s/v1/credentials/status/%s`, s.config.ServiceEndpoint, request.ID)
+	gotCred, err := s.storage.GetStatusListCredential(credStatusListID)
 	if err != nil {
 		return nil, util.LoggingErrorMsgf(err, "could not get credential: %s", request.ID)
 	}
@@ -501,9 +502,10 @@ func updateCredentialStatus(s Service, gotCred *credstorage.StoredCredential, re
 		return nil, util.LoggingErrorMsg(err, "could not store credential")
 	}
 
-	storedStatusListCreds, err := s.storage.GetStatusListCredentialsByIssuerAndSchema(gotCred.Issuer, gotCred.Schema)
-	if err != nil {
-		return nil, util.LoggingNewErrorf("problem with getting status list credential for issuer: %s schema: %s", gotCred.Issuer, gotCred.Schema)
+	statusListCredentialID := gotCred.Credential.CredentialStatus.(map[string]interface{})["statusListCredential"].(string)
+
+	if len(statusListCredentialID) == 0 {
+		return nil, util.LoggingNewErrorf("problem with getting status list credential id")
 	}
 
 	creds, err := s.storage.GetCredentialsByIssuerAndSchema(gotCred.Issuer, gotCred.Schema)
@@ -518,7 +520,7 @@ func updateCredentialStatus(s Service, gotCred *credstorage.StoredCredential, re
 		}
 	}
 
-	generatedStatusListCredential, err := statussdk.GenerateStatusList2021Credential(storedStatusListCreds[0].ID, gotCred.Issuer, statussdk.StatusRevocation, revokedStatusCreds)
+	generatedStatusListCredential, err := statussdk.GenerateStatusList2021Credential(statusListCredentialID, gotCred.Issuer, statussdk.StatusRevocation, revokedStatusCreds)
 	if err != nil {
 		return nil, util.LoggingErrorMsg(err, "could not generate status list")
 	}


Test patch:
diff --git a/integration/credential_revocation_integration_test.go b/integration/credential_revocation_integration_test.go
new file mode 100644
index 0000000..740fc26
--- /dev/null
+++ b/integration/credential_revocation_integration_test.go
@@ -0,0 +1,141 @@
+package integration
+
+import (
+	"github.com/stretchr/testify/assert"
+	"testing"
+)
+
+var credentialRevocationContext = NewTestContext("CredentialRevocation")
+
+func TestRevocationCreateIssuerDIDKeyIntegration(t *testing.T) {
+	if testing.Short() {
+		t.Skip("skipping integration test")
+	}
+
+	didKeyOutput, err := CreateDIDKey()
+	assert.NoError(t, err)
+
+	issuerDID, err := getJSONElement(didKeyOutput, "$.did.id")
+	SetValue(credentialRevocationContext, "issuerDID", issuerDID)
+
+	assert.NoError(t, err)
+	assert.Contains(t, issuerDID, "did:key")
+
+}
+
+func TestRevocationCreateSchemaIntegration(t *testing.T) {
+	if testing.Short() {
+		t.Skip("skipping integration test")
+	}
+
+	output, err := CreateKYCSchema()
+	assert.NoError(t, err)
+
+	schemaID, err := getJSONElement(output, "$.id")
+	SetValue(credentialRevocationContext, "schemaID", schemaID)
+
+	assert.NoError(t, err)
+	assert.NotEmpty(t, schemaID)
+}
+
+func TestRevocationCreateVerifiableCredentialIntegration(t *testing.T) {
+	if testing.Short() {
+		t.Skip("skipping integration test")
+	}
+
+	issuerDID, err := GetValue(credentialRevocationContext, "issuerDID")
+	assert.NoError(t, err)
+	assert.NotEmpty(t, issuerDID)
+
+	schemaID, err := GetValue(credentialRevocationContext, "schemaID")
+	assert.NoError(t, err)
+	assert.NotEmpty(t, schemaID)
+
+	vcOutput, err := CreateVerifiableCredential(issuerDID.(string), schemaID.(string), true)
+	assert.NoError(t, err)
+	assert.NotEmpty(t, vcOutput)
+
+	credStatusURL, err := getJSONElement(vcOutput, "$.credential.credentialStatus.id")
+	SetValue(credentialRevocationContext, "credStatusURL", credStatusURL)
+	assert.NoError(t, err)
+	assert.NotEmpty(t, credStatusURL)
+	assert.Contains(t, credStatusURL, "http")
+
+	statusListCredentialURL, err := getJSONElement(vcOutput, "$.credential.credentialStatus.statusListCredential")
+	SetValue(credentialRevocationContext, "statusListCredentialURL", statusListCredentialURL)
+	assert.NoError(t, err)
+	assert.NotEmpty(t, statusListCredentialURL)
+	assert.Contains(t, statusListCredentialURL, "http")
+
+	credStatusListCredentialOutput, err := get(statusListCredentialURL)
+	assert.NoError(t, err)
+	assert.NotEmpty(t, credStatusListCredentialOutput)
+
+	encodedListOriginal, err := getJSONElement(credStatusListCredentialOutput, "$.credential.credentialSubject.encodedList")
+	assert.NoError(t, err)
+	assert.NotEmpty(t, encodedListOriginal)
+	SetValue(credentialRevocationContext, "encodedListOriginal", encodedListOriginal)
+
+}
+
+func TestRevocationCheckStatusIntegration(t *testing.T) {
+	if testing.Short() {
+		t.Skip("skipping integration test")
+	}
+
+	credStatusURL, err := GetValue(credentialRevocationContext, "credStatusURL")
+	assert.NoError(t, err)
+	assert.NotEmpty(t, credStatusURL)
+
+	credStatusOutput, err := get(credStatusURL.(string))
+	assert.NoError(t, err)
+	assert.NotEmpty(t, credStatusOutput)
+
+	revoked, err := getJSONElement(credStatusOutput, "$.revoked")
+	assert.NoError(t, err)
+	assert.Equal(t, "false", revoked)
+
+	revokedOutput, err := put(credStatusURL.(string), getJSONFromFile("revoked-input.json"))
+	assert.NoError(t, err)
+
+	revoked, err = getJSONElement(revokedOutput, "$.revoked")
+	assert.NoError(t, err)
+	assert.Equal(t, "true", revoked)
+
+	credStatusOutput, err = get(credStatusURL.(string))
+	assert.NoError(t, err)
+	assert.NotEmpty(t, credStatusOutput)
+
+	revoked, err = getJSONElement(credStatusOutput, "$.revoked")
+	assert.NoError(t, err)
+	assert.Equal(t, "true", revoked)
+}
+
+func TestRevocationCheckStatusListCredentialIntegration(t *testing.T) {
+	if testing.Short() {
+		t.Skip("skipping integration test")
+	}
+
+	statusListCredentialURL, err := GetValue(credentialRevocationContext, "statusListCredentialURL")
+	assert.NoError(t, err)
+	assert.NotEmpty(t, statusListCredentialURL)
+
+	credStatusListCredentialOutput, err := get(statusListCredentialURL.(string))
+	assert.NoError(t, err)
+	assert.NotEmpty(t, credStatusListCredentialOutput)
+
+	statusListType, err := getJSONElement(credStatusListCredentialOutput, "$.credential.credentialSubject.type")
+	assert.NoError(t, err)
+	assert.NotEmpty(t, statusListType)
+	assert.Equal(t, "StatusList2021", statusListType)
+
+	encodedList, err := getJSONElement(credStatusListCredentialOutput, "$.credential.credentialSubject.encodedList")
+	assert.NoError(t, err)
+	assert.NotEmpty(t, encodedList)
+
+	encodedListOriginal, err := GetValue(credentialRevocationContext, "encodedListOriginal")
+	assert.NoError(t, err)
+	assert.NotEmpty(t, encodedListOriginal)
+
+	assert.NotEqual(t, encodedListOriginal.(string), encodedList)
+}
diff --git a/integration/didweb_integration_test.go b/integration/didweb_integration_test.go
new file mode 100644
index 0000000..8ec9278
--- /dev/null
+++ b/integration/didweb_integration_test.go
@@ -0,0 +1,153 @@
+package integration
+
+import (
+	"github.com/stretchr/testify/assert"
+	"testing"
+)
+
+var didWebContext = NewTestContext("DIDWeb")
+
+func TestCreateIssuerDIDWebIntegration(t *testing.T) {
+	if testing.Short() {
+		t.Skip("skipping integration test")
+	}
+
+	didWebOutput, err := CreateDIDWeb()
+	assert.NoError(t, err)
+
+	issuerDID, err := getJSONElement(didWebOutput, "$.did.id")
+	SetValue(didWebContext, "issuerDID", issuerDID)
+
+	assert.NoError(t, err)
+	assert.Contains(t, issuerDID, "did:web")
+
+}
+
+func TestCreateAliceDIDWebIntegration(t *testing.T) {
+	if testing.Short() {
+		t.Skip("skipping integration test")
+	}
+
+	didWebOutput, err := CreateDIDWeb()
+	assert.NoError(t, err)
+	assert.NotEmpty(t, didWebOutput)
+
+	aliceDID, err := getJSONElement(didWebOutput, "$.did.id")
+	SetValue(didWebContext, "aliceDID", aliceDID)
+
+	assert.NoError(t, err)
+	assert.Contains(t, aliceDID, "did:web")
+
+	aliceDIDPrivateKey, err := getJSONElement(didWebOutput, "$.privateKeyBase58")
+	SetValue(didWebContext, "aliceDIDPrivateKey", aliceDIDPrivateKey)
+	assert.NoError(t, err)
+	assert.NotEmpty(t, aliceDID)
+
+}
+
+func TestDidWebCreateSchemaIntegration(t *testing.T) {
+	if testing.Short() {
+		t.Skip("skipping integration test")
+	}
+
+	output, err := CreateKYCSchema()
+	assert.NoError(t, err)
+
+	schemaID, err := getJSONElement(output, "$.id")
+	SetValue(didWebContext, "schemaID", schemaID)
+
+	assert.NoError(t, err)
+	assert.NotEmpty(t, schemaID)
+}
+
+func TestDidWebCreateVerifiableCredentialIntegration(t *testing.T) {
+	if testing.Short() {
+		t.Skip("skipping integration test")
+	}
+
+	issuerDID, err := GetValue(didWebContext, "issuerDID")
+	assert.NoError(t, err)
+	assert.NotEmpty(t, issuerDID)
+
+	schemaID, err := GetValue(didWebContext, "schemaID")
+	assert.NoError(t, err)
+	assert.NotEmpty(t, schemaID)
+
+	vcOutput, err := CreateVerifiableCredential(issuerDID.(string), schemaID.(string), false)
+	assert.NoError(t, err)
+	assert.NotEmpty(t, vcOutput)
+
+	credentialJWT, err := getJSONElement(vcOutput, "$.credentialJwt")
+	SetValue(didWebContext, "credentialJWT", credentialJWT)
+	assert.NoError(t, err)
+	assert.NotEmpty(t, credentialJWT)
+}
+
+func TestDidWebCreateCredentialManifestIntegration(t *testing.T) {
+	if testing.Short() {
+		t.Skip("skipping integration test")
+	}
+
+	issuerDID, err := GetValue(didWebContext, "issuerDID")
+	assert.NoError(t, err)
+	assert.NotEmpty(t, issuerDID)
+
+	schemaID, err := GetValue(didWebContext, "schemaID")
+	assert.NoError(t, err)
+	assert.NotEmpty(t, schemaID)
+
+	cmOutput, err := CreateCredentialManifest(issuerDID.(string), schemaID.(string))
+	assert.NoError(t, err)
+
+	presentationDefinitionID, err := getJSONElement(cmOutput, "$.credential_manifest.presentation_definition.id")
+	SetValue(didWebContext, "presentationDefinitionID", presentationDefinitionID)
+	assert.NoError(t, err)
+	assert.NotEmpty(t, presentationDefinitionID)
+
+	manifestID, err := getJSONElement(cmOutput, "$.credential_manifest.id")
+	SetValue(didWebContext, "manifestID", manifestID)
+	assert.NoError(t, err)
+	assert.NotEmpty(t, manifestID)
+}
+
+func TestDidWebSubmitApplicationIntegration(t *testing.T) {
+	if testing.Short() {
+		t.Skip("skipping integration test")
+	}
+
+	credentialJWT, err := GetValue(didWebContext, "credentialJWT")
+	assert.NoError(t, err)
+	assert.NotEmpty(t, credentialJWT)
+
+	presentationDefinitionID, err := GetValue(didWebContext, "presentationDefinitionID")
+	assert.NoError(t, err)
+	assert.NotEmpty(t, presentationDefinitionID)
+
+	manifestID, err := GetValue(didWebContext, "manifestID")
+	assert.NoError(t, err)
+	assert.NotEmpty(t, manifestID)
+
+	aliceDID, err := GetValue(didWebContext, "aliceDID")
+	assert.NoError(t, err)
+	assert.NotEmpty(t, aliceDID)
+
+	aliceDIDPrivateKey, err := GetValue(didWebContext, "aliceDIDPrivateKey")
+	assert.NoError(t, err)
+	assert.NotEmpty(t, aliceDIDPrivateKey)
+
+	credAppJWT, err := CreateCredentialApplicationJWT(presentationDefinitionID.(string), credentialJWT.(string), manifestID.(string), aliceDID.(string), aliceDIDPrivateKey.(string))
+	assert.NoError(t, err)
+	assert.NotEmpty(t, credAppJWT)
+
+	credentialResponseOutput, err := SubmitApplication(credAppJWT)
+	assert.NoError(t, err)
+	assert.NotEmpty(t, credentialResponseOutput)
+
+	crManifestID, err := getJSONElement(credentialResponseOutput, "$.credential_response.manifest_id")
+	assert.NoError(t, err)
+	assert.Equal(t, manifestID, crManifestID)
+
+	vc, err := getJSONElement(credentialResponseOutput, "$.verifiableCredentials[0]")
+	assert.NoError(t, err)
+	assert.NotEmpty(t, vc)
+}
diff --git a/integration/steelthread_integration_test.go b/integration/steelthread_integration_test.go
new file mode 100644
index 0000000..8160aa1
--- /dev/null
+++ b/integration/steelthread_integration_test.go
@@ -0,0 +1,153 @@
+package integration
+
+import (
+	"github.com/stretchr/testify/assert"
+	"testing"
+)
+
+var steelThreadContext = NewTestContext("SteelThread")
+
+func TestCreateIssuerDIDKeyIntegration(t *testing.T) {
+	if testing.Short() {
+		t.Skip("skipping integration test")
+	}
+
+	didKeyOutput, err := CreateDIDKey()
+	assert.NoError(t, err)
+
+	issuerDID, err := getJSONElement(didKeyOutput, "$.did.id")
+	SetValue(steelThreadContext, "issuerDID", issuerDID)
+
+	assert.NoError(t, err)
+	assert.Contains(t, issuerDID, "did:key")
+
+}
+
+func TestCreateAliceDIDKeyIntegration(t *testing.T) {
+	if testing.Short() {
+		t.Skip("skipping integration test")
+	}
+
+	didKeyOutput, err := CreateDIDKey()
+	assert.NoError(t, err)
+	assert.NotEmpty(t, didKeyOutput)
+
+	aliceDID, err := getJSONElement(didKeyOutput, "$.did.id")
+	SetValue(steelThreadContext, "aliceDID", aliceDID)
+
+	assert.NoError(t, err)
+	assert.Contains(t, aliceDID, "did:key")
+
+	aliceDIDPrivateKey, err := getJSONElement(didKeyOutput, "$.privateKeyBase58")
+	SetValue(steelThreadContext, "aliceDIDPrivateKey", aliceDIDPrivateKey)
+	assert.NoError(t, err)
+	assert.NotEmpty(t, aliceDID)
+
+}
+
+func TestCreateSchemaIntegration(t *testing.T) {
+	if testing.Short() {
+		t.Skip("skipping integration test")
+	}
+
+	output, err := CreateKYCSchema()
+	assert.NoError(t, err)
+
+	schemaID, err := getJSONElement(output, "$.id")
+	SetValue(steelThreadContext, "schemaID", schemaID)
+
+	assert.NoError(t, err)
+	assert.NotEmpty(t, schemaID)
+}
+
+func TestCreateVerifiableCredentialIntegration(t *testing.T) {
+	if testing.Short() {
+		t.Skip("skipping integration test")
+	}
+
+	issuerDID, err := GetValue(steelThreadContext, "issuerDID")
+	assert.NoError(t, err)
+	assert.NotEmpty(t, issuerDID)
+
+	schemaID, err := GetValue(steelThreadContext, "schemaID")
+	assert.NoError(t, err)
+	assert.NotEmpty(t, schemaID)
+
+	vcOutput, err := CreateVerifiableCredential(issuerDID.(string), schemaID.(string), false)
+	assert.NoError(t, err)
+	assert.NotEmpty(t, vcOutput)
+
+	credentialJWT, err := getJSONElement(vcOutput, "$.credentialJwt")
+	SetValue(steelThreadContext, "credentialJWT", credentialJWT)
+	assert.NoError(t, err)
+	assert.NotEmpty(t, credentialJWT)
+}
+
+func TestCreateCredentialManifestIntegration(t *testing.T) {
+	if testing.Short() {
+		t.Skip("skipping integration test")
+	}
+
+	issuerDID, err := GetValue(steelThreadContext, "issuerDID")
+	assert.NoError(t, err)
+	assert.NotEmpty(t, issuerDID)
+
+	schemaID, err := GetValue(steelThreadContext, "schemaID")
+	assert.NoError(t, err)
+	assert.NotEmpty(t, schemaID)
+
+	cmOutput, err := CreateCredentialManifest(issuerDID.(string), schemaID.(string))
+	assert.NoError(t, err)
+
+	presentationDefinitionID, err := getJSONElement(cmOutput, "$.credential_manifest.presentation_definition.id")
+	SetValue(steelThreadContext, "presentationDefinitionID", presentationDefinitionID)
+	assert.NoError(t, err)
+	assert.NotEmpty(t, presentationDefinitionID)
+
+	manifestID, err := getJSONElement(cmOutput, "$.credential_manifest.id")
+	SetValue(steelThreadContext, "manifestID", manifestID)
+	assert.NoError(t, err)
+	assert.NotEmpty(t, manifestID)
+}
+
+func TestSubmitApplicationIntegration(t *testing.T) {
+	if testing.Short() {
+		t.Skip("skipping integration test")
+	}
+
+	credentialJWT, err := GetValue(steelThreadContext, "credentialJWT")
+	assert.NoError(t, err)
+	assert.NotEmpty(t, credentialJWT)
+
+	presentationDefinitionID, err := GetValue(steelThreadContext, "presentationDefinitionID")
+	assert.NoError(t, err)
+	assert.NotEmpty(t, presentationDefinitionID)
+
+	manifestID, err := GetValue(steelThreadContext, "manifestID")
+	assert.NoError(t, err)
+	assert.NotEmpty(t, manifestID)
+
+	aliceDID, err := GetValue(steelThreadContext, "aliceDID")
+	assert.NoError(t, err)
+	assert.NotEmpty(t, aliceDID)
+
+	aliceDIDPrivateKey, err := GetValue(steelThreadContext, "aliceDIDPrivateKey")
+	assert.NoError(t, err)
+	assert.NotEmpty(t, aliceDIDPrivateKey)
+
+	credAppJWT, err := CreateCredentialApplicationJWT(presentationDefinitionID.(string), credentialJWT.(string), manifestID.(string), aliceDID.(string), aliceDIDPrivateKey.(string))
+	assert.NoError(t, err)
+	assert.NotEmpty(t, credAppJWT)
+
+	credentialResponseOutput, err := SubmitApplication(credAppJWT)
+	assert.NoError(t, err)
+	assert.NotEmpty(t, credentialResponseOutput)
+
+	crManifestID, err := getJSONElement(credentialResponseOutput, "$.credential_response.manifest_id")
+	assert.NoError(t, err)
+	assert.Equal(t, manifestID, crManifestID)
+
+	vc, err := getJSONElement(credentialResponseOutput, "$.verifiableCredentials[0]")
+	assert.NoError(t, err)
+	assert.NotEmpty(t, vc)
+}
diff --git a/test/testdata/application-input-jwt.json b/integration/testdata/application-input-jwt.json
similarity index 100%
rename from test/testdata/application-input-jwt.json
rename to integration/testdata/application-input-jwt.json
diff --git a/test/testdata/application-input.json b/integration/testdata/application-input.json
similarity index 100%
rename from test/testdata/application-input.json
rename to integration/testdata/application-input.json
diff --git a/test/testdata/application-output.json b/integration/testdata/application-output.json
similarity index 100%
rename from test/testdata/application-output.json
rename to integration/testdata/application-output.json
diff --git a/test/testdata/credential-input.json b/integration/testdata/credential-input.json
similarity index 100%
rename from test/testdata/credential-input.json
rename to integration/testdata/credential-input.json
diff --git a/test/testdata/credential-output.json b/integration/testdata/credential-output.json
similarity index 100%
rename from test/testdata/credential-output.json
rename to integration/testdata/credential-output.json
diff --git a/integration/testdata/credential-revocable-input.json b/integration/testdata/credential-revocable-input.json
new file mode 100644
index 0000000..04ea032
--- /dev/null
+++ b/integration/testdata/credential-revocable-input.json
@@ -0,0 +1,22 @@
+{
+  "data": {
+    "givenName":"ricky bobby",
+    "additionalName":"hank hill",
+    "familyName":"simpson",
+    "birthDate":"2009-01-03",
+    "postalAddress": {
+      "addressCountry": "U.S.A",
+      "addressLocality": "Austin",
+      "addressRegion": "TX",
+      "postalCode": "78724",
+      "streetAddress": "123 Janktopia Ave."
+    },
+    "taxID":"123"
+  },
+  "issuer": "<CREDISSUERID>",
+  "subject": "<CREDSUBJECTID>",
+  "@context":"https://www.w3.org/2018/credentials/v1",
+  "expiry": "2051-10-05T14:48:00.000Z",
+  "schema": "<SCHEMAID>",
+  "revocable": true
+}
\ No newline at end of file
diff --git a/test/testdata/did-input.json b/integration/testdata/did-input.json
similarity index 100%
rename from test/testdata/did-input.json
rename to integration/testdata/did-input.json
diff --git a/test/testdata/did-output.json b/integration/testdata/did-output.json
similarity index 100%
rename from test/testdata/did-output.json
rename to integration/testdata/did-output.json
diff --git a/integration/testdata/did-web-input.json b/integration/testdata/did-web-input.json
new file mode 100644
index 0000000..fcb7f09
--- /dev/null
+++ b/integration/testdata/did-web-input.json
@@ -0,0 +1,4 @@
+{
+  "keyType":"Ed25519",
+  "didWebId":"did:web:tbd.website"
+}
\ No newline at end of file
diff --git a/test/testdata/manifest-input.json b/integration/testdata/manifest-input.json
similarity index 100%
rename from test/testdata/manifest-input.json
rename to integration/testdata/manifest-input.json
diff --git a/test/testdata/manifest-output.json b/integration/testdata/manifest-output.json
similarity index 100%
rename from test/testdata/manifest-output.json
rename to integration/testdata/manifest-output.json
diff --git a/integration/testdata/revoked-input.json b/integration/testdata/revoked-input.json
new file mode 100644
index 0000000..184b15d
--- /dev/null
+++ b/integration/testdata/revoked-input.json
@@ -0,0 +1,3 @@
+{
+  "revoked":true
+}
\ No newline at end of file
diff --git a/test/testdata/schema-input.json b/integration/testdata/schema-input.json
similarity index 100%
rename from test/testdata/schema-input.json
rename to integration/testdata/schema-input.json
diff --git a/test/testdata/schema-output.json b/integration/testdata/schema-output.json
similarity index 100%
rename from test/testdata/schema-output.json
rename to integration/testdata/schema-output.json
diff --git a/integration/testutil.go b/integration/testutil.go
new file mode 100644
index 0000000..4bb3219
--- /dev/null
+++ b/integration/testutil.go
@@ -0,0 +1,39 @@
+package integration
+
+import (
+	"github.com/pkg/errors"
+	"sync"
+)
+
+type TestContext struct {
+	testName string
+	values   map[string]interface{}
+}
+
+var globalMutex sync.RWMutex
+
+func NewTestContext(testName string) *TestContext {
+	return &TestContext{
+		testName: testName,
+		values:   make(map[string]interface{}),
+	}
+}
+
+// SetValue sets a value in the test context.
+func SetValue(ctx *TestContext, key string, value interface{}) {
+	globalMutex.RLock()
+	defer globalMutex.RUnlock()
+	ctx.values[key] = value
+}
+
+// GetValue retrieves a value from the test context.
+func GetValue(ctx *TestContext, key string) (interface{}, error) {
+	globalMutex.RLock()
+	defer globalMutex.RUnlock()
+	value, ok := ctx.values[key]
+	if !ok {
+		return nil, errors.Errorf("value not found for key %s", key)
+	}
+
+	return value, nil
+}
diff --git a/pkg/server/router/did_test.go b/pkg/server/router/did_test.go
index 3ffcf38..58c875c 100644
--- a/pkg/server/router/did_test.go
+++ b/pkg/server/router/did_test.go
@@ -130,6 +130,7 @@ func TestDIDRouter(t *testing.T) {
 		supported := didService.GetSupportedMethods()
 		assert.NotEmpty(tt, supported)
 		assert.Len(tt, supported.Methods, 2)
+
 		assert.ElementsMatch(tt, supported.Methods, []didsdk.Method{didsdk.KeyMethod, didsdk.WebMethod})
 
 		// bad key type
diff --git a/pkg/server/server_credential_test.go b/pkg/server/server_credential_test.go
index 1224ef6..7b070a4 100644
--- a/pkg/server/server_credential_test.go
+++ b/pkg/server/server_credential_test.go
@@ -1,17 +1,18 @@
 package server
 
 import (
+	"github.com/goccy/go-json"
 	"fmt"
 	"net/http"
 	"net/http/httptest"
 	"os"
+	"strings"
 	"testing"
 	"time"
 
 	credsdk "github.com/TBD54566975/ssi-sdk/credential"
 	"github.com/TBD54566975/ssi-sdk/crypto"
 	didsdk "github.com/TBD54566975/ssi-sdk/did"
-	"github.com/goccy/go-json"
 	"github.com/stretchr/testify/assert"
 	"github.com/stretchr/testify/require"
 
@@ -933,10 +934,12 @@ func TestCredentialAPI(t *testing.T) {
 		credStatusListID := (credStatusMap["statusListCredential"]).(string)
 
 		assert.NotEmpty(tt, credStatusListID)
-		fmt.Println(credStatusListID)
 
-		req = httptest.NewRequest(http.MethodGet, fmt.Sprintf("https://localhost:8080/v1/credentials/status/%s", credStatusListID), nil)
-		err = credRouter.GetCredentialStatusList(newRequestContextWithParams(map[string]string{"id": credStatusListID}), w, req)
+		i := strings.LastIndex(credStatusListID, "/")
+		uuidStringUUID := credStatusListID[i+1:]
+
+		req = httptest.NewRequest(http.MethodGet, fmt.Sprintf("https://localhost:8080/%s", credStatusListID), nil)
+		err = credRouter.GetCredentialStatusList(newRequestContextWithParams(map[string]string{"id": uuidStringUUID}), w, req)
 		assert.NoError(tt, err)
 
 		var credListResp router.GetCredentialStatusListResponse
diff --git a/test/steelthread.go b/test/steelthread.go
deleted file mode 100644
index 3f1f0c4..0000000
--- a/test/steelthread.go
+++ /dev/null
@@ -1,269 +0,0 @@
-package steelthread
-
-import (
-	"bytes"
-	"embed"
-	"fmt"
-	manifestsdk "github.com/TBD54566975/ssi-sdk/credential/manifest"
-	"github.com/TBD54566975/ssi-sdk/crypto"
-	"github.com/mr-tron/base58"
-	credmodel "github.com/tbd54566975/ssi-service/internal/credential"
-	"github.com/tbd54566975/ssi-service/internal/keyaccess"
-	"io"
-	"net/http"
-	"strings"
-
-	cmpact "encoding/json"
-	"github.com/goccy/go-json"
-	"github.com/oliveagle/jsonpath"
-	"github.com/pkg/errors"
-)
-
-const (
-	endpoint = "http://localhost:8080/"
-	version  = "v1/"
-)
-
-var (
-	//go:embed testdata
-	testVectors embed.FS
-)
-
-func RunTest() error {
-	fmt.Println("Start end to end test")
-
-	// Make sure service is up and running
-	output, err := get(endpoint + "readiness")
-	if err != nil {
-		return errors.Wrapf(err, "problem with readiness endpoint with output: %s", output)
-	}
-
-	// Create a did for the issuer
-	fmt.Println("\n\nCreate a did for the issuer:")
-	output, err = put(endpoint+version+"dids/key", getJSONFromFile("did-input.json"))
-	if err != nil {
-		return errors.Wrapf(err, "problem with dids/key endpoint with output: %s", output)
-	}
-
-	issuerDID, err := getJSONElement(output, "$.did.id")
-	if err != nil {
-		return errors.Wrap(err, "problem with getting json element")
-	}
-
-	// Create a did for alice
-	fmt.Println("\n\nCreate a did for alice:")
-	output, err = put(endpoint+version+"dids/key", getJSONFromFile("did-input.json"))
-	if err != nil {
-		return errors.Wrapf(err, "problem with dids/key endpoint with output: %s", output)
-	}
-
-	aliceDID, err := getJSONElement(output, "$.did.id")
-	if err != nil {
-		return errors.Wrap(err, "problem with getting json element")
-	}
-
-	aliceDIDPrivateKey, err := getJSONElement(output, "$.privateKeyBase58")
-	if err != nil {
-		return errors.Wrap(err, "getting json")
-	}
-
-	// Create a schema to be used in CM
-	fmt.Println("\n\nCreate a schema to be used in CM:")
-	output, err = put(endpoint+version+"schemas", getJSONFromFile("schema-input.json"))
-	if err != nil {
-		return errors.Wrapf(err, "problem with schema endpoint with output: %s", output)
-	}
-
-	schemaID, err := getJSONElement(output, "$.id")
-	if err != nil {
-		return errors.Wrap(err, "problem getting json element")
-	}
-
-	// Create a credential to be used in CA:
-	fmt.Println("\n\nCreate a credential to be used in CA:")
-	credentialJSON := getJSONFromFile("credential-input.json")
-	credentialJSON = strings.ReplaceAll(credentialJSON, "<CREDISSUERID>", issuerDID)
-	credentialJSON = strings.ReplaceAll(credentialJSON, "<CREDSUBJECTID>", issuerDID)
-	credentialJSON = strings.ReplaceAll(credentialJSON, "<SCHEMAID>", schemaID)
-	output, err = put(endpoint+version+"credentials", credentialJSON)
-	if err != nil {
-		return errors.Wrapf(err, "problem with credentials endpoint with output: %s", output)
-	}
-
-	credentialJWT, err := getJSONElement(output, "$.credentialJwt")
-	if err != nil {
-		return errors.Wrap(err, "problem getting json element")
-	}
-
-	// Create our Credential Manifest
-	fmt.Println("\n\nCreate our Credential Manifest:")
-	manifestJSON := getJSONFromFile("manifest-input.json")
-	manifestJSON = strings.ReplaceAll(manifestJSON, "<SCHEMAID>", schemaID)
-	manifestJSON = strings.ReplaceAll(manifestJSON, "<ISSUERID>", issuerDID)
-	output, err = put(endpoint+version+"manifests", manifestJSON)
-	if err != nil {
-		return errors.Wrapf(err, "problem with manifest endpoint with output: %s", output)
-	}
-
-	presentationDefinitionID, err := getJSONElement(output, "$.credential_manifest.presentation_definition.id")
-	if err != nil {
-		return errors.Wrap(err, "problem getting json element")
-	}
-	manifestID, err := getJSONElement(output, "$.credential_manifest.id")
-	if err != nil {
-		return errors.Wrap(err, "problem getting json element")
-	}
-
-	// Submit an application
-	fmt.Println("\n\nSubmit an Application:")
-	applicationJSON := getJSONFromFile("application-input.json")
-	applicationJSON = strings.ReplaceAll(applicationJSON, "<DEFINITIONID>", presentationDefinitionID)
-	applicationJSON = strings.ReplaceAll(applicationJSON, "<VCJWT>", credentialJWT)
-	applicationJSON = strings.ReplaceAll(applicationJSON, "<MANIFESTID>", manifestID)
-
-	// Start signing credential application
-	alicPrivKeyBytes, err := base58.Decode(aliceDIDPrivateKey)
-	if err != nil {
-		return errors.Wrap(err, "problem base58 decoding")
-	}
-
-	alicePrivKey, err := crypto.BytesToPrivKey(alicPrivKeyBytes, crypto.Ed25519)
-	if err != nil {
-		return errors.Wrap(err, "problem with bytes to priv key")
-	}
-
-	signer, err := keyaccess.NewJWKKeyAccess(aliceDID, alicePrivKey)
-	if err != nil {
-		return errors.Wrap(err, "problem with creating signer")
-	}
-
-	credAppWrapper := getValidApplicationRequest(applicationJSON, credentialJWT)
-
-	signed, err := signer.SignJSON(credAppWrapper)
-	if err != nil {
-		return errors.Wrap(err, "problem signing json")
-	}
-
-	fmt.Println("\nApplication JSON:")
-	fmt.Println(compactJSONOutput(applicationJSON))
-
-	fmt.Println("\nSIGNED APPLICATION JWT:")
-	fmt.Println(signed)
-	// End signing credential application
-
-	trueApplicationJSON := getJSONFromFile("application-input-jwt.json")
-	trueApplicationJSON = strings.ReplaceAll(trueApplicationJSON, "<APPLICATIONJWT>", signed.String())
-
-	output, err = put(endpoint+version+"manifests/applications", trueApplicationJSON)
-	if err != nil {
-		return errors.Wrapf(err, "problem with application endpoint with output: %s", output)
-	}
-
-	return err
-}
-
-func compactJSONOutput(json string) string {
-	jsonBytes := []byte(json)
-	buffer := new(bytes.Buffer)
-	if err := cmpact.Compact(buffer, jsonBytes); err != nil {
-		fmt.Println(err)
-	}
-
-	return buffer.String()
-}
-
-func getJSONElement(jsonString string, jsonPath string) (string, error) {
-	jsonMap := make(map[string]interface{})
-	if err := json.Unmarshal([]byte(jsonString), &jsonMap); err != nil {
-		return "", errors.Wrap(err, "problem with unmarshalling json string")
-	}
-
-	element, err := jsonpath.JsonPathLookup(jsonMap, jsonPath)
-	if err != nil {
-		return "", errors.Wrap(err, "problem with finding element in json string")
-	}
-
-	return element.(string), err
-}
-
-func get(url string) (string, error) {
-	fmt.Printf("\nPerforming GET request to:  %s\n", url)
-
-	resp, err := http.Get(url) // #nosec: testing only.
-	if err != nil {
-		return "", errors.Wrap(err, "problem with finding element in json string")
-	}
-
-	body, err := io.ReadAll(resp.Body)
-	if err != nil {
-		return "", errors.Wrap(err, "problem with parsing body")
-	}
-
-	if is200Response(resp.StatusCode) {
-		return "", fmt.Errorf("status code not in the 200s. body: %s", string(body))
-	}
-
-	fmt.Printf("\nOutput:\n")
-	fmt.Println(string(body))
-
-	return string(body), err
-}
-
-func put(url string, json string) (string, error) {
-	fmt.Printf("\nPerforming PUT request to:  %s \n\nwith data: \n%s\n", url, compactJSONOutput(json))
-
-	client := new(http.Client)
-
-	req, err := http.NewRequest(http.MethodPut, url, bytes.NewBuffer([]byte(json)))
-	if err != nil {
-		return "", errors.Wrap(err, "problem with building http req")
-	}
-
-	req.Header.Set("Content-Type", "application/json")
-	resp, err := client.Do(req)
-	if err != nil {
-		return "", errors.Wrap(err, "problem client http client")
-	}
-
-	body, err := io.ReadAll(resp.Body)
-	if err != nil {
-		return "", errors.Wrap(err, "problem with parsing body")
-	}
-
-	if is200Response(resp.StatusCode) {
-		return "", fmt.Errorf("status code not in the 200s. body: %s", string(body))
-	}
-
-	fmt.Printf("\nOutput:\n")
-	fmt.Println(string(body))
-
-	return string(body), err
-}
-
-func getJSONFromFile(fileName string) string {
-	b, _ := testVectors.ReadFile("testdata/" + fileName)
-	return string(b)
-}
-
-func is200Response(statusCode int) bool {
-	return statusCode/100 != 2
-}
-
-func getValidApplicationRequest(credAppJSON string, credentialJWT string) manifestsdk.CredentialApplicationWrapper {
-	var createApplication manifestsdk.CredentialApplication
-	if err := json.Unmarshal([]byte(credAppJSON), &createApplication); err != nil {
-		fmt.Println("unmarshal error")
-	}
-
-	contain, err := credmodel.NewCredentialContainerFromJWT(credentialJWT)
-	if err != nil {
-		fmt.Println("Problem making NewCredentialContainerFromJWT")
-	}
-	contains := []credmodel.Container{*contain}
-
-	creds := credmodel.ContainersToInterface(contains)
-	return manifestsdk.CredentialApplicationWrapper{
-		CredentialApplication: createApplication,
-		Credentials:           creds,
-	}
-}