Phase 6: Documentation, Samples & Testing
Parent Epic: #179
Depends on: All previous phases
Overview
Complete the Volcengine provider implementation with comprehensive documentation, sample configurations, and test coverage.
Tasks
1. Sample Configurations
Create sample YAML files in samples/ directory:
1.1 Basic Function
version: 0.1.0
provider:
name: volcengine
region: cn-beijing
app: insight-poc
service: insight-poc-basic
functions:
hello:
name: poc-hello
code:
runtime: nodejs/18
handler: index.handler
path: ./artifacts/hello.zip
memory: 128
timeout: 30
1.2 Function with API Gateway
1.3 Object Storage
1.4 VPC Function
1.5 Complete Example
version: 0.1.0
provider:
name: volcengine
region: cn-beijing
vars:
runtime: nodejs/18
stages:
dev:
memory: 256
prod:
memory: 512
app: insight-poc
service: insight-poc-complete
tags:
owner: geek-fun
environment: ${stages.stage}
functions:
api_handler:
name: poc-api-handler
code:
runtime: ${vars.runtime}
handler: index.handler
path: ./artifacts/api.zip
memory: ${stages.memory}
timeout: 30
environment:
NODE_ENV: ${stages.node_env}
events:
api:
type: API_GATEWAY
name: poc-gateway
triggers:
- method: GET
path: /api/hello
backend: ${functions.api_handler}
domain:
domain_name: api.serverlessinsights.com
buckets:
static_assets:
name: poc-static-assets
security:
acl: public-read
website:
code: ./dist
index: index.html
2. Test Artifacts
3. Unit Tests
3.1 Client Operations Tests
3.2 Resource Tests
3.3 Planner Tests
3.4 Integration Tests
4. Documentation
4.1 README Update
| Provider | Functions | API Gateway | Storage | Status |
|----------|-----------|-------------|---------|--------|
| **Volcengine** | ✅ veFaaS | ✅ API Gateway | ✅ TOS | Stable |
4.2 Provider Documentation
# Volcengine Provider
## Configuration
### Credentials
Set environment variables:
\`\`\`bash
export VOLCSTACK_ACCESS_KEY_ID="your-access-key"
export VOLCSTACK_SECRET_ACCESS_KEY="your-secret-key"
\`\`\`
### Regions
| Region | Code |
|--------|------|
| 华北2(北京) | cn-beijing |
| 华东2(上海) | cn-shanghai |
| 华南1(广州) | cn-guangzhou |
### Supported Services
- **veFaaS** - Function Compute
- **TOS** - Object Storage
- **API Gateway** - HTTP API hosting
## Example
\`\`\`yaml
provider:
name: volcengine
region: cn-beijing
\`\`\`
4.3 Sample README
5. CI/CD Updates
6. Changelog
## [Unreleased]
### Added
- Volcengine provider support
- veFaaS Function Service
- TOS Object Storage
- API Gateway integration
- IAM role management
- VPC configuration
Test Coverage Requirements
| Component |
Target Coverage |
| Client Operations |
≥ 80% |
| Resource Lifecycle |
≥ 85% |
| Planner Logic |
≥ 90% |
| Executor |
≥ 80% |
Acceptance Criteria
Must Have
Should Have
Nice to Have
References
Estimated Effort
Medium (3-4 days)
Phase 6: Documentation, Samples & Testing
Parent Epic: #179
Depends on: All previous phases
Overview
Complete the Volcengine provider implementation with comprehensive documentation, sample configurations, and test coverage.
Tasks
1. Sample Configurations
Create sample YAML files in
samples/directory:1.1 Basic Function
samples/volcengine-poc-function.yml- Minimal function example1.2 Function with API Gateway
samples/volcengine-poc-api.yml- API Gateway integration1.3 Object Storage
samples/volcengine-poc-bucket.yml- TOS bucket with static website1.4 VPC Function
samples/volcengine-poc-vpc.yml- Function with VPC configuration1.5 Complete Example
samples/volcengine-poc-complete.yml- Full-stack serverless app2. Test Artifacts
tests/fixtures/artifacts/volcengine-function.zip- Test function code3. Unit Tests
3.1 Client Operations Tests
tests/common/volcengineClient/vefaasOperations.test.tstests/common/volcengineClient/tosOperations.test.tstests/common/volcengineClient/iamOperations.test.tstests/common/volcengineClient/apigwOperations.test.ts3.2 Resource Tests
tests/stack/volcengineStack/vefaasResource.test.tstests/stack/volcengineStack/tosResource.test.tstests/stack/volcengineStack/apigwResource.test.ts3.3 Planner Tests
tests/stack/volcengineStack/vefaasPlanner.test.tstests/stack/volcengineStack/tosPlanner.test.tstests/stack/volcengineStack/apigwPlanner.test.ts3.4 Integration Tests
tests/stack/volcengineStack/deployer.test.tstests/stack/volcengineStack/destroyer.test.ts4. Documentation
4.1 README Update
4.2 Provider Documentation
docs/providers/volcengine.md- Provider-specific documentation4.3 Sample README
samples/README_VOLCENGINE.md- Sample documentation5. CI/CD Updates
6. Changelog
Test Coverage Requirements
Acceptance Criteria
Must Have
npm testnpm run lint:checknpm run buildShould Have
Nice to Have
References
Estimated Effort
Medium (3-4 days)