Skip to content

Commit

Permalink
add identity search component to e2e test
Browse files Browse the repository at this point in the history
Signed-off-by: linus-sun <[email protected]>
  • Loading branch information
linus-sun committed Nov 21, 2024
1 parent b281a00 commit c13095e
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 13 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,4 +90,6 @@ jobs:
check-latest: true
- name: run Rekor end-to-end test
run: ./pkg/test/rekor_e2e/rekor_monitor_e2e_test.sh
- name: run CT end-to-end test
run: ./pkg/test/ct_e2e/ct_monitor_e2e_test.sh

Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import (
ctclient "github.com/google/certificate-transparency-go/client"
"github.com/google/certificate-transparency-go/jsonclient"
"github.com/sigstore/rekor-monitor/pkg/ct"
"github.com/sigstore/rekor-monitor/pkg/identity"
)

const (
Expand Down Expand Up @@ -54,4 +55,16 @@ func TestCTConsistencyCheck(t *testing.T) {
if err != nil {
t.Errorf("failed to successfully complete consistency check: %v", err)
}

_, err = ct.IdentitySearch(fulcioClient, 0, 1, identity.MonitoredValues{
CertificateIdentities: []identity.CertificateIdentity{
{
CertSubject: "test-cert-subject",
Issuers: []string{},
},
},
})
if err != nil {
t.Errorf("failed to successfully complete identity search: %v", err)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,32 +21,22 @@ pushd $HOME
echo "downloading service repos"
for repo in certificate-transparency-go trillian; do
if [[ ! -d $repo ]]; then
git clone https://github.com/sigstore/${repo}.git
git clone https://github.com/google/${repo}.git
fi
done

docker_compose="docker compose"

pushd ./certificate-transparency-go/trillian/examples/deployment/docker/ctfe/
docker compose up -d
until [ $(${docker_compose} ps | grep -c "(healthy)") == 1 ];
do
if [ $count -eq 6 ]; then
echo "! timeout reached"
exit 1
else
echo -n "."
sleep 5
let 'count+=1'
fi
done
sleep 20
popd

docker exec -i ctfe-db mariadb -pzaphod -Dtest < ./trillian/storage/mysql/schema/storage.sql
docker exec -i ctfe-db mariadb -pzaphod -Dtest < ./certificate-transparency-go/trillian/ctfe/storage/mysql/schema.sql

CTFE_CONF_DIR=/tmp/ctfedocker
if [ -d $CTFE_CONF_DIR ]; then
if [ ! -d $CTFE_CONF_DIR ]; then
mkdir ${CTFE_CONF_DIR}
fi

Expand Down

0 comments on commit c13095e

Please sign in to comment.