ram

module
v0.4.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 2, 2022 License: Apache-2.0

README

RAM v1 is now deprecated, please use RAMv2

=> go to RAMv2

Product overview

RAM Testing framework

RAM Unit testing framework
  • GO unit testing functions MUST be prefixed with TestUnit enabling filtering in testing_unit.yaml
  • GO unit test source code file SHOULD be named after the code source file using the suffix _unit_test.go example.
    • Code source file func_validatestruct.go
    • Unit tests code file func_validatestruct_unit_test.go
  • Unit tests MUST be small enough so all the unit tests are run on each push and each PR update: testing_unit.yaml
  • Unit test MUST run in isolation:
    1. No real call to a dependency API
      • meaning, the service account used to run the CI pipeline need no expertanl API IAM related role
    2. Test double (mocks / stubs/ fakes) are not encouraged:
      • prefer to use a real object
      • As calling real object is not allowed in unit test (previous guideline), move these tests to small integration tests (next section)
RAM Integration testing framework
  • GO integration testing functions MUST be prefixed with TestInteg enabling filtering in testing_integ.yaml
  • GO integration test source code file SHOULD be named after the code source file using the suffix _integ_test.go example
    • Code source file meth_folderdeployment_deploy.go
    • Unit tests code file meth_folderdeployment_deploy_integ_test.go
  • Integration tests MUST be small enough so a GO package integration tests are run on each push on the package code and each PR to master update: testing_integ.yaml
  • The project hosting the integration tests MUST have a project name that contains ram-build avoiding resources deletion, creation driven during integration test to occur in the wrong project
  • To run integration tests locally set the environment variable RAM_ITEST_PROJECT_ID
  • The project hosting the integration tests MUST have a Cloud Operation Workspace hosted by itself
  • The following IAM bindings MUST be set with the service account used to run integration tests:
    • sandboxes folder
      • folder admin
        • required by: grm
    • project hosting integration tests
      • editor
        • required to create, delete integration test resources
  • The project hosting the service account used to run the integration test MUST have the following API enabled:
    • Cloud Resource Manager API

What's next

RAM microservice packages on go.dev

Directories

Path Synopsis
services
convertlog2feed
Package convertlog2feed convert log entry messsage from pubsub into feed compatible format pubusub message
Package convertlog2feed convert log entry messsage from pubsub into feed compatible format pubusub message
dumpinventory
Package dumpinventory request CAI to perform an export
Package dumpinventory request CAI to perform an export
getgroupsettings
Package getgroupsettings retreives the settings of one group from `Groups Settings API`
Package getgroupsettings retreives the settings of one group from `Groups Settings API`
listgroupmembers
Package listgroupmembers extract all members from a group in GCI directory using the Admin SDK API
Package listgroupmembers extract all members from a group in GCI directory using the Admin SDK API
listgroups
Package listgroups extract all groups from a GCI directory using the Admin SDK API
Package listgroups extract all groups from a GCI directory using the Admin SDK API
monitor
Package monitor check asset compliance
Package monitor check asset compliance
publish2fs
Package publish2fs publish assets resource feeds as FireStore documents
Package publish2fs publish assets resource feeds as FireStore documents
setdashboards
Package setdashboards set cloud monitoring dashboards for RAM
Package setdashboards set cloud monitoring dashboards for RAM
setfeeds
Package setfeeds set Cloud Asset Inventory feeds at organization level
Package setfeeds set Cloud Asset Inventory feeds at organization level
setlogmetrics
Package setlogmetrics set cloud logging metrics from logs
Package setlogmetrics set cloud logging metrics from logs
setlogsinks
Package setlogsinks set organization log sinks to pubsub
Package setlogsinks set organization log sinks to pubsub
splitdump
Package splitdump nibble large CAI dumps into PubSub asset feed messages
Package splitdump nibble large CAI dumps into PubSub asset feed messages
stream2bq
Package stream2bq streams PubSub message into BigQuery tables
Package stream2bq streams PubSub message into BigQuery tables
upload2gcs
Package upload2gcs stores feeds as JSON files in a GCS bucket
Package upload2gcs stores feeds as JSON files in a GCS bucket
utilities
aut
Package aut helps authentication and tokens
Package aut helps authentication and tokens
bil
Package bil helps with billing management
Package bil helps with billing management
cai
Package cai helps with Cloud Asset Inventory
Package cai helps with Cloud Asset Inventory
deploy
Package deploy defines the core structure for deployments and common APIs
Package deploy defines the core structure for deployments and common APIs
erm
Package erm helps with errors management
Package erm helps with errors management
ffo
Package ffo helps with file and folder operations
Package ffo helps with file and folder operations
gae
Package gae helps with Google Application Engine
Package gae helps with Google Application Engine
gbq
Package gbq helps with google Bigquery
Package gbq helps with google Bigquery
gcb
Package gcb helps with Google Cloud Build
Package gcb helps with Google Cloud Build
gcf
Package gcf helps with Google cloud functions
Package gcf helps with Google cloud functions
gcs
Package gcs helps with Google Cloud Storage
Package gcs helps with Google Cloud Storage
gfs
Package gfs helps with Google FireStore
Package gfs helps with Google FireStore
glo
Package glo helps with google cloud logging
Package glo helps with google cloud logging
gps
Package gps helps with Google Pubsub
Package gps helps with Google Pubsub
grm
Package grm helps with Google Resource Manager, aka Organizations, Folders, Projects and their role bindings
Package grm helps with Google Resource Manager, aka Organizations, Folders, Projects and their role bindings
gsr
Package gsr helps with Google Source Repositories
Package gsr helps with Google Source Repositories
gsu
Package gsu helps with Google Service Usage, aka APIs activation
Package gsu helps with Google Service Usage, aka APIs activation
iamgt
Package iamgt helps with Google Identity Access Management, aka Service Accounts and their roles bindings
Package iamgt helps with Google Identity Access Management, aka Service Accounts and their roles bindings
itst
Package itst helps with integration tests
Package itst helps with integration tests
logging
Package logging helps with Logging
Package logging helps with Logging
lsk
Package lsk helps with Log Sinks
Package lsk helps with Log Sinks
mon
Package mon helps cloud monitoring
Package mon helps cloud monitoring
ramcli
Package ramcli Real-time Asset Monitor command line cli
Package ramcli Real-time Asset Monitor command line cli
sch
Package sch helps with Google Cloud Scheduler
Package sch helps with Google Cloud Scheduler
solution
Package solution defines the structure for solution settings
Package solution defines the structure for solution settings
str
Package str helps with strings
Package str helps with strings
validater
Package validater helps to validate struct fields
Package validater helps to validate struct fields

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL