Files
archie/.okf/codebase/internal/store/queries_test.md
T
sam 7c34bdae5a okf: scaffold knowledge bundle and MCP server config
Adds a harvested .okf/ knowledge bundle (codebase concepts + starter
architecture/services/rules scaffolding) and .mcp.json pointing at the
shared okf MCP service (http://localhost:8765/archie-core/), which
serves multiple projects' bundles from a single process.
2026-07-22 04:36:50 +10:00

1.1 KiB

description, resource, tags, timestamp, title, type
description resource tags timestamp title type
Source module internal/store/queries_test.go (224 lines). internal/store/queries_test.go
go
source
2026-07-21T18:36:22Z queries_test.go Module

Module queries_test.go

Path: internal/store/queries_test.go
Lines: 224

Snippet Preview

package store

import (
	"context"
	"testing"
	"time"

	"github.com/samcharles93/archie-core/internal/events"
)

func TestTaskByIssue(t *testing.T) {
	s := openTest(t)
	ctx := context.Background()

	if got, err := s.TaskByIssue(ctx, "sam", "archie", 1); err != nil || got != nil {
		t.Fatalf("TaskByIssue on empty store = (%+v, %v)", got, err)
	}

	if _, err := s.EnqueueIssue(ctx, "sam", "archie", 1, "title", "body", "bug"); err != nil {
		t.Fatal(err)
	}
	got, err := s.TaskByIssue(ctx, "sam", "archie", 1)
	if err != nil || got == nil {
		t.Fatalf("TaskByIssue = (%+v, %v)", got, err)
	}
	if got.Title != "title" || got.IssueNumber != 1 {
		t.Fatalf("TaskByIssue = %+v", got)
	}

	if got, err := s.TaskByIssue(ctx, "sam", "archie", 2); err != nil || got != nil {